From: Joe Hunt Date: Fri, 28 Nov 2008 22:49:44 +0000 (+0000) Subject: extending the delivery period to avoid early invoice X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=f2c8908ca06da547851a22417c79d90a61114115;p=textcart.git extending the delivery period to avoid early invoice --- diff --git a/purchasing/includes/db/invoice_db.inc b/purchasing/includes/db/invoice_db.inc index 2e35c96..ae19c7e 100644 --- a/purchasing/includes/db/invoice_db.inc +++ b/purchasing/includes/db/invoice_db.inc @@ -217,7 +217,7 @@ function add_supp_invoice($supp_trans) // do not receive as ref because we chang // always return due to change in currency. $mat_cost = update_average_material_cost(null, $entered_grn->item_code, $diff, $entered_grn->this_quantity_inv, $old_date, true); - $deliveries = get_deliveries_between($entered_grn->item_code, $old_date, $date_); + $deliveries = get_deliveries_between($entered_grn->item_code, $old_date, Today()); // extend the period, if invoice is before any deliveries. if ($deliveries[0] != 0) // have deliveries been done during the period? { $deliveries[1] /= $deliveries[0];