Merge pull request #10042 from atm-gauthier/6.0_fix_massaction_sendinvoicebymail

FIX : We want to be able to send PDF of paid invoices
This commit is contained in:
Laurent Destailleur 2018-11-19 18:14:12 +01:00 committed by GitHub
commit fcb9b693cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -175,12 +175,12 @@ if (! $error && $massaction == 'confirm_presend')
{
//var_dump($thirdpartyid.' - '.$objectid.' - '.$object->statut);
if ($objectclass == 'Facture' && $object->statut != Facture::STATUS_VALIDATED)
if ($objectclass == 'Facture' && $object->statut == Facture::STATUS_DRAFT)
{
$langs->load("errors");
$nbignored++;
$resaction.='<div class="error">'.$langs->trans('ErrorOnlyInvoiceValidatedCanBeSentInMassAction',$object->ref).'</div><br>';
continue; // Payment done or started or canceled
continue;
}
if ($objectclass == 'Commande' && $object->statut == Commande::STATUS_DRAFT)
{