Merge pull request #11410 from ptibogxiv/patch-195
Fix qty to negative if refund
This commit is contained in:
commit
1930277257
@ -234,7 +234,8 @@ if ($id > 0 || ! empty($ref))
|
||||
while ($i < min($num, $limit))
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
|
||||
if ($objp->type == Facture::TYPE_CREDIT_NOTE) $objp->qty=-($objp->qty);
|
||||
$total_ht+=$objp->total_ht;
|
||||
$total_qty+=$objp->qty;
|
||||
|
||||
|
||||
@ -595,7 +595,7 @@ if ($sql_select)
|
||||
print '</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>';
|
||||
$total_qty+=$objp->prod_qty;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user