mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Debug v20
This commit is contained in:
parent
a765760e81
commit
467e96e81f
|
|
@ -744,7 +744,10 @@ if (empty($reshook)) {
|
|||
if ($object->statut == $object::STATUS_VALIDATED || (getDolGlobalString('PROPAL_SKIP_ACCEPT_REFUSE') && $object->statut == $object::STATUS_DRAFT)) {
|
||||
$db->begin();
|
||||
|
||||
$result = $object->closeProposal($user, GETPOSTINT('statut'), GETPOSTINT('note_private'));
|
||||
$oldstatus = $object->status;
|
||||
|
||||
$result = $object->closeProposal($user, GETPOSTINT('statut'), GETPOST('note_private'));
|
||||
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$error++;
|
||||
|
|
@ -758,7 +761,7 @@ if (empty($reshook)) {
|
|||
$deposit_percent_from_payment_terms = getDictionaryValue('c_payment_term', 'deposit_percent', $object->cond_reglement_id);
|
||||
|
||||
if (
|
||||
!$error && GETPOSTINT('statut') == $object::STATUS_SIGNED && GETPOSTINT('generate_deposit') == 'on'
|
||||
!$error && GETPOSTINT('statut') == $object::STATUS_SIGNED && GETPOST('generate_deposit') == 'on'
|
||||
&& !empty($deposit_percent_from_payment_terms) && isModEnabled('invoice') && $user->hasRight('facture', 'creer')
|
||||
) {
|
||||
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
|
||||
|
|
@ -777,7 +780,7 @@ if (empty($reshook)) {
|
|||
$locationTarget = DOL_URL_ROOT . '/compta/facture/card.php?id=' . $deposit->id;
|
||||
} else {
|
||||
$error++;
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
setEventMessages("Failed to create down payment - ".$object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -806,6 +809,9 @@ if (empty($reshook)) {
|
|||
exit;
|
||||
}
|
||||
} else {
|
||||
$object->status = $oldstatus;
|
||||
$object->statut = $oldstatus;
|
||||
|
||||
$db->rollback();
|
||||
$action = '';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user