projects
/
fa-stable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e7d70d0
)
PHP 7.4 bug, continued.
author
Joe Hunt
<joe.hunt.consulting@gmail.com>
Tue, 4 Aug 2020 06:08:33 +0000
(08:08 +0200)
committer
Joe Hunt
<joe.hunt.consulting@gmail.com>
Tue, 4 Aug 2020 06:08:33 +0000
(08:08 +0200)
purchasing/includes/db/grn_db.inc
patch
|
blob
|
history
diff --git
a/purchasing/includes/db/grn_db.inc
b/purchasing/includes/db/grn_db.inc
index d3cee3398e5a1e45c872df53caa53fc24579e9be..6b74148968899bc197c4728301e461e6c9fd86d4 100644
(file)
--- a/
purchasing/includes/db/grn_db.inc
+++ b/
purchasing/includes/db/grn_db.inc
@@
-17,15
+17,14
@@
function update_average_material_cost($supplier, $stock_id, $price, $qty, $date,
// save a couple of db calls like get_supplier()
$supp = get_supplier($supplier);
// save a couple of db calls like get_supplier()
$supp = get_supplier($supplier);
- if ($supplier != null)
+ if ($supplier != null) {
$currency = $supp['curr_code'];
$currency = $supp['curr_code'];
- else
+ if ($supp['tax_included'])
+ $price = get_tax_free_price_for_item($stock_id, $price, $supp['tax_group_id'],
+ $supp['tax_included']);
+ } else
$currency = null;
$currency = null;
- if ($supp['tax_included'])
- $price = get_tax_free_price_for_item($stock_id, $price, $supp['tax_group_id'],
- $supp['tax_included']);
-
if ($currency != null)
{
$ex_rate = get_exchange_rate_to_home_currency($currency, $date);
if ($currency != null)
{
$ex_rate = get_exchange_rate_to_home_currency($currency, $date);