Merge pull request #11410 from ptibogxiv/patch-195
Fix qty to negative if refund
This commit is contained in:
commit
1930277257
@ -235,6 +235,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
{
|
{
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
|
|
||||||
|
if ($objp->type == Facture::TYPE_CREDIT_NOTE) $objp->qty=-($objp->qty);
|
||||||
$total_ht+=$objp->total_ht;
|
$total_ht+=$objp->total_ht;
|
||||||
$total_qty+=$objp->qty;
|
$total_qty+=$objp->qty;
|
||||||
|
|
||||||
|
|||||||
@ -595,7 +595,7 @@ if ($sql_select)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
//print '<td class="left">'.$prodreftxt.'</td>';
|
//print '<td class="left">'.$prodreftxt.'</td>';
|
||||||
|
if ($type_element == 'invoice' && $objp->doc_type == Facture::TYPE_CREDIT_NOTE) $objp->prod_qty=-($objp->prod_qty);
|
||||||
print '<td class="right">'.$objp->prod_qty.'</td>';
|
print '<td class="right">'.$objp->prod_qty.'</td>';
|
||||||
$total_qty+=$objp->prod_qty;
|
$total_qty+=$objp->prod_qty;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user