Merge pull request #11410 from ptibogxiv/patch-195

Fix qty to negative if refund
This commit is contained in:
Laurent Destailleur 2019-06-28 12:38:06 +02:00 committed by GitHub
commit 1930277257
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -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;

View File

@ -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;