From: Joe Hunt Date: Tue, 3 Nov 2009 00:43:27 +0000 (+0000) Subject: Bad debit account when debiting service items. X-Git-Tag: v2.4.2~19^2~1058 X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=f090974ec4881a8f10d40d4052363490eba3d2bb Bad debit account when debiting service items. Removed unneeded reference to $result in db_num_rows. Gave warnings Better formatting of update.html --- diff --git a/CHANGELOG.txt b/CHANGELOG.txt index fb93a7ab..988af372 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,12 @@ Legend: ! -> Note $ -> Affected files +03-Nov-2009 Joe Hunt +# Bad debit account when debiting service items. +$ /purchasing/includes/db/invoice_db.inc +# Removed unneeded reference to $result in db_num_rows. Gave warnings. +$ /includes/db/connect_db.inc + 02-Nov-2009 Janusz Dobrowolski # Bad default value retrieved for service COGS account. $ /inventory/manage/items.php diff --git a/includes/db/connect_db.inc b/includes/db/connect_db.inc index 060637bc..203883b0 100644 --- a/includes/db/connect_db.inc +++ b/includes/db/connect_db.inc @@ -84,7 +84,7 @@ function db_free_result ($result) mysql_free_result($result); } -function db_num_rows (&$result) +function db_num_rows ($result) { return mysql_num_rows($result); } diff --git a/purchasing/includes/db/invoice_db.inc b/purchasing/includes/db/invoice_db.inc index 21a43d89..ffdb8c17 100644 --- a/purchasing/includes/db/invoice_db.inc +++ b/purchasing/includes/db/invoice_db.inc @@ -211,8 +211,8 @@ function add_supp_invoice($supp_trans, $invoice_no=0) // do not receive as ref b $line_taxfree = $entered_grn->taxfree_charge_price($supp_trans->tax_group_id); $line_tax = $entered_grn->full_charge_price($supp_trans->tax_group_id) - $line_taxfree; $stock_gl_code = get_stock_gl_code($entered_grn->item_code); - - $total += add_gl_trans_supplier($trans_type, $invoice_id, $date_, $stock_gl_code["inventory_account"], + $iv_act = (is_inventory_item($entered_grn->item_code) ? $stock_gl_code["inventory_account"] : $stock_gl_code["cogs_account"]); + $total += add_gl_trans_supplier($trans_type, $invoice_id, $date_, $iv_act, $stock_gl_code['dimension_id'], $stock_gl_code['dimension2_id'], $entered_grn->this_quantity_inv * $line_taxfree, $supp_trans->supplier_id); // -------------- if price changed since po received. 16 Aug 2008 Joe Hunt @@ -253,7 +253,7 @@ function add_supp_invoice($supp_trans, $invoice_no=0) // do not receive as ref b $stock_gl_code['dimension_id'], $stock_gl_code['dimension2_id'], _("Cost diff."), $amt, null, null, null, "The general ledger transaction could not be added for the price variance of the inventory item"); - add_gl_trans($trans_type, $invoice_id, $date_, $stock_gl_code["inventory_account"], + add_gl_trans($trans_type, $invoice_id, $date_, $iv_act, 0, 0, _("Cost diff."), -$amt, null, null, null, "The general ledger transaction could not be added for the price variance of the inventory item"); } diff --git a/update.html b/update.html index 54f1d412..5779a0c3 100644 --- a/update.html +++ b/update.html @@ -7,24 +7,22 @@
FrontAccounting Update

-
- -

Important Notes

+

Important Notes

\ No newline at end of file +Price calculations is set.
\ No newline at end of file