Topic: Supplier Payment Report rep203

Supplier Payment Report rep203 has two things that seem not correct; (to me at least).

1. Transaction # is showing Supplier Reference Instead.
2. Not sorted by date.. (a more logical display of info)... its sorted by some internal choice I guess

How can one correct the above?

As attached.

Post's attachments

rep203.png 32.1 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Supplier Payment Report rep203

Within the rep203.php file. you need to change something to get it.

function getTransactions($supplier, $date)
{
    $date = date2sql($date);
    $dec = user_price_dec();

    $sql = "SELECT  supp_reference, tran_date, due_date, trans_no, type, rate,
            (ABS( ov_amount) + ABS( ov_gst) -  alloc) AS Balance,
            (ABS( ov_amount) + ABS( ov_gst) ) AS TranTotal
        FROM ".TB_PREF."supp_trans
        WHERE  supplier_id = '$supplier'
        AND ROUND(ABS( ov_amount),$dec) + ROUND(ABS( ov_gst),$dec) - 
        ROUND( alloc,$dec) != 0
        AND  tran_date <='$date'
        ORDER BY  type,
             trans_no";

    return db_query($sql, "No transactions were returned");
}

Here you need to add some  changes.

 
function getTransactions($supplier, $date)
{
    $date = date2sql($date);
    $dec = user_price_dec();

    $sql = "SELECT  reference AS supp_reference, tran_date, due_date, trans_no, type, rate,   // Here I have modified to make the reference as supp_reference
            (ABS( ov_amount) + ABS( ov_gst) -  alloc) AS Balance,
            (ABS( ov_amount) + ABS( ov_gst) ) AS TranTotal
        FROM ".TB_PREF."supp_trans
        WHERE  supplier_id = '$supplier'
        AND ROUND(ABS( ov_amount),$dec) + ROUND(ABS( ov_gst),$dec) - 
        ROUND( alloc,$dec) != 0
        AND  tran_date <='$date'
        ORDER BY tran_date,  type,   // New Order by Here with tran_date
             trans_no";

    return db_query($sql, "No transactions were returned");
}
Subscription service based on FA
HRM CRM POS batch Themes

Re: Supplier Payment Report rep203

Thanks @kvvaradha

It works..as attached.

Post's attachments

rep203_rev.png 35.5 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Supplier Payment Report rep203

Good to hear it.

Subscription service based on FA
HRM CRM POS batch Themes