Topic: how to extract some info for sales invoice report
Hi all.
I am trying to include some additional info into rep107 (sales invoice).
in a modified rep107.php file that was posted in this forum, I find (around line 107) the following code:
****
$Net = round2($sign * ((1 - $myrow2["discount_percent"]) * $myrow2["unit_price"] * $myrow2["quantity"]),
user_price_dec());
$SubTotal += $Net;
$DisplayPrice = number_format2($myrow2["unit_price"],$dec);
$DisplayQty = number_format2($sign*$myrow2["quantity"],get_qty_dec($myrow2['stock_id']));
$DisplayTaxRate = number_format2($myrow2["unit_tax"] * 100 / $myrow2["unit_price"],user_percent_dec()) . "%";
$DisplayNet = number_format2($Net,$dec);
if ($myrow2["discount_percent"]==0)
****
What I actually need is to show, instead of
number_format2($myrow2["unit_tax"] * 100 / $myrow2["unit_price"],user_percent_dec()) . "%";
the field 'name' of table 'item_tax_type' which is associated to each item sold.
The purpose is to show per each item sold the code of the tax associated with the item as required by accounting here in Italy.
I cannot use the percentage as in the example but the name given to such tax, because some tax types need to be identified correctly: e.g. 0 VAT can depend on many reasons, export (a code), special VAT rate (another code), etc.
Is it feasible?
Any suggestions?
Thanks for the great job you are doing with FA!
Regards,
Carlo