mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 17:18:13 +01:00
Fix bug where invoice situation invoices could not be created (#33842)
This commit is contained in:
@@ -1450,7 +1450,7 @@ if (empty($reshook)) {
|
||||
}
|
||||
|
||||
// Standard or deposit invoice, not from a Predefined template invoice
|
||||
if ((GETPOST('type') == Facture::TYPE_STANDARD || GETPOST('type') == Facture::TYPE_DEPOSIT || GETPOST('type') == Facture::TYPE_PROFORMA || (GETPOST('type') == Facture::TYPE_SITUATION && !GETPOST('situations'))) && GETPOST('fac_rec') <= 0) {
|
||||
if ((GETPOST('type') == Facture::TYPE_STANDARD || GETPOST('type') == Facture::TYPE_DEPOSIT || GETPOST('type') == Facture::TYPE_PROFORMA || (GETPOST('type') == Facture::TYPE_SITUATION && GETPOSTINT('situations') < 0)) && GETPOST('fac_rec') <= 0) {
|
||||
$typeamount = GETPOST('typedeposit', 'aZ09');
|
||||
$valuestandardinvoice = price2num(str_replace('%', '', GETPOST('valuestandardinvoice', 'alpha')), 'MU');
|
||||
$valuedeposit = price2num(str_replace('%', '', GETPOST('valuedeposit', 'alpha')), 'MU');
|
||||
@@ -1991,7 +1991,7 @@ if (empty($reshook)) {
|
||||
}
|
||||
|
||||
// Situation invoices
|
||||
if (GETPOST('type') == Facture::TYPE_SITUATION && GETPOST('situations')) {
|
||||
if (GETPOST('type') == Facture::TYPE_SITUATION && GETPOSTINT('situations') > 0) {
|
||||
if (empty($dateinvoice)) {
|
||||
$error++;
|
||||
$mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date"));
|
||||
|
||||
Reference in New Issue
Block a user