projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update material cost when quantity on hand is zero. @notrinos.
[fa-stable.git]
/
sales
/
includes
/
sales_db.inc
diff --git
a/sales/includes/sales_db.inc
b/sales/includes/sales_db.inc
index 949ee79e2f404b5d47b2c19348704eefc174a9d6..465002303887c7ca2659ea5ec8aa9b34865e360c 100644
(file)
--- a/
sales/includes/sales_db.inc
+++ b/
sales/includes/sales_db.inc
@@
-47,7
+47,7
@@
function add_gl_trans_customer($type, $type_no, $date_, $account, $dimension, $d
function get_calculated_price($stock_id, $add_pct)
{
function get_calculated_price($stock_id, $add_pct)
{
- $avg = get_
standard
_cost($stock_id);
+ $avg = get_
unit
_cost($stock_id);
if ($avg == 0)
return 0;
return round2($avg * (1 + $add_pct / 100), user_price_dec());
if ($avg == 0)
return 0;
return round2($avg * (1 + $add_pct / 100), user_price_dec());
@@
-279,7
+279,7
@@
function read_sales_trans($doc_type, $trans_no, &$cart)
@$myrow["src_id"]);
}
}
@$myrow["src_id"]);
}
}
- $cart->prepayments = get_payments_for($trans_no, $doc_type);
+ $cart->prepayments = get_payments_for($trans_no, $doc_type
, $myrow["debtor_no"]
);
} // !newdoc
} // !newdoc