Merge pull request #18060 from atm-arnaud/FIX_deposit_can_create_credit_note_in_payment_conf

FIX deposit can create credit note in payment conf
This commit is contained in:
Laurent Destailleur 2021-06-30 14:48:29 +02:00 committed by GitHub
commit 246f7b054e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5260,7 +5260,7 @@ elseif ($id > 0 || !empty($ref))
}
// Create a credit note
if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA) && $object->statut > 0 && $usercancreate)
if (($object->type == Facture::TYPE_STANDARD || ($object->type == Facture::TYPE_DEPOSIT && empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS) ) || $object->type == Facture::TYPE_PROFORMA) && $object->statut > 0 && $usercancreate)
{
if (!$objectidnext)
{