wrong inventory GL transactions. No GL transactions should be here.
[
0000200] stock_master material_cost incorrectly updated during GRN when
price format uses thousands seperator. A couple of minor errors too.
! -> Note
$ -> Affected files
+03-Feb-2010 Joe Hunt
+# When buying a service item from a supplier, the delivery produced
+ wrong inventory GL transactions. No GL transactions should be here.
+$ /sales/includes/db/sales_delivery_db.inc
+# [0000200] stock_master material_cost incorrectly updated during GRN when
+ price format uses thousands seperator. A couple of minor errors too.
+$ /purchasing/includes/db/grn_db.inc
+ /purchasing/includes/db/invoices_db.inc
+
03-Feb-2010 Chaitanya/Joe
+ Added a Profit and Loss Drilldown page and changed menu link
$ /applications/generalledger.php
else
$currency = null;
$dec = user_price_dec();
- $price = price_decimal_format($price, $dec);
+ price_decimal_format($price, $dec);
+ $price = round2($price, $dec);
if ($currency != null)
{
- $ex_rate = get_exchange_rate_to_home_currency($currency, $date_);
+ $ex_rate = get_exchange_rate_to_home_currency($currency, $date);
$price_in_home_currency = $price / $ex_rate;
//$price_in_home_currency = to_home_currency($price, $currency, $date);
}
$currency = get_supplier_currency($supplier);
$ex_rate = get_exchange_rate_to_home_currency($currency, $old_date);
$amount1 = $amount1 / $ex_rate;
- $ex_rate = get_exchange_rate_to_home_currency($currency, $date_);
+ $ex_rate = get_exchange_rate_to_home_currency($currency, $date);
$amount2 = $amount2 / $ex_rate;
$diff = $amount2 - $amount1;
return round2($diff, $dec);
if ($trans_no != 0) // Inserted 2008-09-25 Joe Hunt
$delivery_line->standard_cost = get_standard_cost($delivery_line->stock_id);
+ // do not use standard cost if it's a non-inventory item, 2010-02-03 Joe Hunt
+ if (!is_inventory_item($delivery_line->stock_id))
+ $delivery_line->standard_cost = 0;
+
/* add delivery details for all lines */
write_customer_trans_detail_item(ST_CUSTDELIVERY, $delivery_no, $delivery_line->stock_id,
$delivery_line->item_description, $delivery_line->qty_dispatched,