Merge pull request #22591 from rycks/13.0_19912_add_default_payment_terms_to_invoices

close #19912 : add default payment terms to invoice
This commit is contained in:
Laurent Destailleur 2022-10-15 10:38:37 +02:00 committed by GitHub
commit 332df184bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -432,6 +432,9 @@ if ($action == 'confirm_generateinvoice') {
$tmpinvoice->socid = $projectstatic->thirdparty->id;
$tmpinvoice->date = dol_mktime(GETPOST('rehour', 'int'), GETPOST('remin', 'int'), GETPOST('resec', 'int'), GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
$tmpinvoice->fk_project = $projectstatic->id;
$tmpinvoice->cond_reglement_id = $projectstatic->thirdparty->cond_reglement_id;
$tmpinvoice->mode_reglement_id = $projectstatic->thirdparty->mode_reglement_id;
$tmpinvoice->fk_account = $projectstatic->thirdparty->fk_account;
if ($invoiceToUse) {
$tmpinvoice->fetch($invoiceToUse);