@APMuthu,

Sure.  I will do it next week as I'm away.

Thanks.

52

(2 replies, posted in Setup)

I am trying to figure out the various type of transactions:

For example,
Transaction Type 13 is Delivery Note,
Transaction type 12 is Customer Payment and type 10 is probably Sales Invoice (I'm not sure).

I search the forum and googled but could not find a complete list.

Would someone please advise if there is already a lookup list available of all the transaction types and the respective codes?

Thank you.

@joe, @apmuthu:  Thank you.

/Mark

Hi APMuthu,

I'm sorry I have made a typo mistake. It should be 0.07 x 10,000 = 700.  The tax for 2nd item is 1500 x 0.07 = 105. The tax rate for both items is 7% and the unit price are inclusive of the 7% tax.

If you take a look at the screen shot again, I actually credit both items. For both items, the total GST should be 805 and not 700.  700 is only from one of the items, item 1.

I noticed that if I click on the 2nd item first, then followed by 1st item, the GST will only show from the 2nd item which is 105.  I have tested with multiple items with tax to credit, the tax showed always only from the item I first click and not all of them items.

Hi there,

I have found 2 issues in the Supplier Credit Note.  The URL is purchasing/supplier_credit.php?New=1

1.   The header "Qty Yet To Credit" should be "Unit Price To Credit" as the data are the unit price.  For this, I have updated  this file purchasing/includes/ui/invoice_ui.inc and that seems OK now.

2.   If I were to make credit to multiple invoices, only the GST of the first instance of invoice I selected is computed and displayed.  The GSTS of the 2nd instance of clicks on the lines/invoices onwards are not included.  --- How to rectify this?  Please advise.

I have a screen shot showing the errors at this link: http://www.mgatech-sg.com/images/ErrorOnSupplierCredit-2.3.23.jpg


Thank you.

Thanks for your reply...

Sorry for dumping a long message in my last post.  What I would like to achieve is to use the function below ((get_exchange_rate_from_to($from_curr_code, $to_curr_code, $date_),)  to get the exchange rate based on the Invoice date. The date is the key item to get the correct exch rate.

      $exchrate = number_format2(get_exchange_rate_from_to($from_curr_code, $to_curr_code, $date_),$dec);  // this is the function from banking.inc

I am able to get the from (USD) and to  (SGD) curr codes, but I couldn't get the date to apply to the function "get_exchange_rate_from_to($from_curr_code, $to_curr_code, $date_)".   I keep getting "1.0000" in return.

Or is there other functions I could use to achieve the same results?

Thanks again.

Hi there,

I have similar requests from users.  When Invoice is not in home currency (SGD), we need to show extra info to convert the GST and Total amount in home currency.  Below is an example:

The invoice amount is in USD  (the home currency is SGD:)
======================================
Sub-total:    6,500.00
Shipping:             0.00
GST TAX (7%):         455.00
TOTAL INVOICE: 6,955.00

Additional Lines to be shown on the invoice if it is not in home currency. “//” denotes comment:
============================================================
Home Currency: SGD
Exch Rate: 1.22
GST TAX:  555.10       //This is GST in SGD (455 * 1.22)
Total Invoice: 8485.10     // This is Total invoice (6955 * 1.22)

---------
I managed to get the additional lines printed on the invoice.  However, I couldn’t extract the correct exchange rate (the exchange rate kept showing “1”) therefore the results of the calculations are wrong..  I have added the following lines to rep107.php.    I use the function “function get_exchange_rate_from_to($from_curr_code, $to_curr_code, $date_)” in banking.inc.   I spent many hours trying to figure out the issue of the exchange rate but I failed to get the correct rate. 

I have 2 issues:

1.     Is the “$date_” in this function (“function get_exchange_rate_from_to($from_curr_code, $to_curr_code, $date_)” ) used for selecting the exchange rate?   How do I make sure that the exchange rate selected is the same as the invoice used to update the GL? What if the date does not match the date in the exchange rate table, would it simply uses “1” or it will use the rate in the earlier date?

2.    I would appreciate it if someone could help me  in correcting the codes below which I modified in rep107.php:

        $rep->Font(+1);     // increate the font size
                 $rep->TextCol(0, 5, _("Home Currency:"), -2);     // Line 1 text
        $from_curr_code = get_company_currency();   // From currency USD
        $to_curr_code = $myrow['curr_code'];         //To currency SGD
        $rep->TextCol(1, 4, $from_curr_code, -2);   // Line 1 next to “Home Currecny”: Foreign currency
        $rep->NewLine(1);
        $date_ = $myrow['document_date'];    // Not sure if this is correct??? When tested, it shows nothing.
        $exchrate = number_format2(get_exchange_rate_from_to($from_curr_code, $to_curr_code, $date_),$dec);  // this is the function from banking.inc
        $rep->TextCol(0, 6, _("Exch Rate: "), -2);  // Line 2 text
        $rep->TextCol(1, 4, $exchrate, -50); // Line 2, next to “Exch Rate”
        $rep->NewLine(1);
        $rep->TextCol(0, 6, _("GST: "), -2); //Line 3 text
        $DisplayTax1 = number_format2(($DisplayTax * $exchrate),$dec);
        $rep->TextCol(1, 4, $DisplayTax1, -50); //GST amount in home currency (SGD)
        $rep->NewLine(1);
        $rep->TextCol(0, 2, _("Total Invoice: "), -2);  //Line 4 text
        $DisplayTotal1 = number_format2(($sign*($myrow["ov_freight"] + $myrow["ov_gst"] +
        $myrow["ov_amount"]+$myrow["ov_freight_tax"])*$exchrate),$dec);
        $rep->TextCol(1, 4, $DisplayTotal1, -70);


Thanks!