Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add user_author in create recurrence invoice #31219

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions htdocs/compta/facture/class/facture-rec.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1333,6 +1333,7 @@
$facture->brouillon = 1;
$facture->statut = self::STATUS_DRAFT;
$facture->status = self::STATUS_DRAFT;
$facture->fk_user_author = $facture->user_author = $facturerec->user_author;
$facture->date = (empty($facturerec->date_when) ? $now : $facturerec->date_when); // We could also use dol_now here but we prefer date_when so invoice has real date when we would like even if we generate later.
$facture->socid = $facturerec->socid;
if (!empty($facturerec->fk_multicurrency)) {
Expand All @@ -1358,7 +1359,7 @@
}
}
if (!$error && $facturerec->generate_pdf) {
// We refresh the object in order to have all necessary data (like date_lim_reglement)

Check failure on line 1362 in htdocs/compta/facture/class/facture-rec.class.php

View workflow job for this annotation

GitHub Actions / phpstan / php-stan (8.2)

Property Facture::$fk_user_author (int) does not accept User.
$facture->fetch($facture->id);
$result = $facture->generateDocument($facturerec->model_pdf, $langs);
if ($result <= 0) {
Expand Down
Loading