Merge pull request #11064 from atm-greg/FIX_create_supplier_invoice_button

FIX test to display create invoice button on supplier_order card
This commit is contained in:
Laurent Destailleur 2019-04-24 21:07:15 +02:00 committed by GitHub
commit b62323939e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2342,8 +2342,6 @@ elseif (! empty($object->id))
} }
// Create bill // Create bill
if (! empty($conf->facture->enabled))
{
if (! empty($conf->fournisseur->enabled) && ($object->statut >= 2 && $object->statut != 7 && $object->billed != 1)) // statut 2 means approved, 7 means canceled if (! empty($conf->fournisseur->enabled) && ($object->statut >= 2 && $object->statut != 7 && $object->billed != 1)) // statut 2 means approved, 7 means canceled
{ {
if ($user->rights->fournisseur->facture->creer) if ($user->rights->fournisseur->facture->creer)
@ -2351,7 +2349,6 @@ elseif (! empty($object->id))
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/card.php?action=create&amp;origin='.$object->element.'&amp;originid='.$object->id.'&amp;socid='.$object->socid.'">'.$langs->trans("CreateBill").'</a>'; print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/card.php?action=create&amp;origin='.$object->element.'&amp;originid='.$object->id.'&amp;socid='.$object->socid.'">'.$langs->trans("CreateBill").'</a>';
} }
} }
}
// Classify billed manually (need one invoice if module invoice is on, no condition on invoice if not) // Classify billed manually (need one invoice if module invoice is on, no condition on invoice if not)
if ($user->rights->fournisseur->commande->creer && $object->statut >= 2 && $object->statut != 7 && $object->billed != 1) // statut 2 means approved if ($user->rights->fournisseur->commande->creer && $object->statut >= 2 && $object->statut != 7 && $object->billed != 1) // statut 2 means approved