Fix scrutinizer

This commit is contained in:
Laurent Destailleur 2022-05-18 12:40:44 +02:00
parent 86d34af4b0
commit 308e7a3d9b
55 changed files with 112 additions and 99 deletions

View File

@ -748,6 +748,7 @@ class AccountingAccount extends CommonObject
$reshook = $hookmanager->executeHooks('accoutancyBindingCalculation', $parameters); // Note that $action and $object may have been modified by some hooks $reshook = $hookmanager->executeHooks('accoutancyBindingCalculation', $parameters); // Note that $action and $object may have been modified by some hooks
if (empty($reshook)) { if (empty($reshook)) {
$const_name = '';
if ($type == 'customer') { if ($type == 'customer') {
$const_name = "SOLD"; $const_name = "SOLD";
} elseif ($type == 'supplier') { } elseif ($type == 'supplier') {

View File

@ -699,6 +699,8 @@ class Lettering extends BookKeeping
return $grouped_payments; return $grouped_payments;
} }
$save_payment_by_element = null;
$save_element_by_payment = null;
if ($element_id == 0) { if ($element_id == 0) {
// Save list when is the begin of recursive function // Save list when is the begin of recursive function
$save_payment_by_element = $payment_by_element; $save_payment_by_element = $payment_by_element;

View File

@ -1652,13 +1652,13 @@ class Facture extends CommonInvoice
0, // date_start 0, // date_start
0, // date_end 0, // date_end
0, 0,
$lines[$i]->info_bits, // info_bits 0, // info_bits
0, 0,
'HT', 'HT',
0, 0,
0, // product_type 0, // product_type
1, 1,
$lines[$i]->special_code, 0, // special_code
$deposit->origin, $deposit->origin,
0, 0,
0, 0,
@ -5503,6 +5503,7 @@ class Facture extends CommonInvoice
$sendContent = make_substitutions($content, $substitutionarray, $outputlangs, 1); $sendContent = make_substitutions($content, $substitutionarray, $outputlangs, 1);
// Recipient // Recipient
$to = '';
$res = $tmpinvoice->fetch_thirdparty(); $res = $tmpinvoice->fetch_thirdparty();
$recipient = $tmpinvoice->thirdparty; $recipient = $tmpinvoice->thirdparty;
if ($res > 0) { if ($res > 0) {
@ -5524,7 +5525,7 @@ class Facture extends CommonInvoice
$error++; $error++;
} }
if (!$error) { if (!$error && $to) {
// Errors Recipient // Errors Recipient
$errors_to = $conf->global->MAIN_MAIL_ERRORS_TO; $errors_to = $conf->global->MAIN_MAIL_ERRORS_TO;

View File

@ -65,6 +65,26 @@ abstract class CommonDocGenerator
*/ */
public $scandir; public $scandir;
public $page_hauteur;
public $page_largeur;
public $marge_gauche;
public $marge_droite;
public $marge_haute;
public $marge_basse;
public $option_logo;
public $option_tva;
public $option_multilang;
public $option_freetext;
public $option_draft_watermark;
public $option_modereg;
public $option_condreg;
public $option_escompte;
public $option_credit_note;
public $emetteur;
/** /**
* Constructor * Constructor

View File

@ -466,6 +466,8 @@ class Form
$ext_element = false; $ext_element = false;
$button_only = false; $button_only = false;
$inputOption = ''; $inputOption = '';
$rows = '';
$cols = '';
if (is_object($object)) { if (is_object($object)) {
$element = $object->element; $element = $object->element;
@ -1001,9 +1003,10 @@ class Form
* @param string $htmloption Options html on select object * @param string $htmloption Options html on select object
* @param int $forcecombo Force to load all values and output a standard combobox (with no beautification) * @param int $forcecombo Force to load all values and output a standard combobox (with no beautification)
* @param array $events Event options to run on change. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled'))) * @param array $events Event options to run on change. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
* @param array $disableautocomplete Disable autocomplete
* @return string HTML string with select and input * @return string HTML string with select and input
*/ */
public function select_incoterms($selected = '', $location_incoterms = '', $page = '', $htmlname = 'incoterm_id', $htmloption = '', $forcecombo = 1, $events = array()) public function select_incoterms($selected = '', $location_incoterms = '', $page = '', $htmlname = 'incoterm_id', $htmloption = '', $forcecombo = 1, $events = array(), $disableautocomplete = 0)
{ {
// phpcs:enable // phpcs:enable
global $conf, $langs; global $conf, $langs;
@ -1038,8 +1041,6 @@ class Form
$num = $this->db->num_rows($resql); $num = $this->db->num_rows($resql);
$i = 0; $i = 0;
if ($num) { if ($num) {
$foundselected = false;
while ($i < $num) { while ($i < $num) {
$obj = $this->db->fetch_object($resql); $obj = $this->db->fetch_object($resql);
$incotermArray[$i]['rowid'] = $obj->rowid; $incotermArray[$i]['rowid'] = $obj->rowid;
@ -1901,6 +1902,7 @@ class Form
{ {
// phpcs:enable // phpcs:enable
global $conf, $user, $langs, $hookmanager; global $conf, $user, $langs, $hookmanager;
global $action;
// If no preselected user defined, we take current user // If no preselected user defined, we take current user
if ((is_numeric($selected) && ($selected < -2 || empty($selected))) && empty($conf->global->SOCIETE_DISABLE_DEFAULT_SALESREPRESENTATIVE)) { if ((is_numeric($selected) && ($selected < -2 || empty($selected))) && empty($conf->global->SOCIETE_DISABLE_DEFAULT_SALESREPRESENTATIVE)) {
@ -2414,6 +2416,7 @@ class Form
if (!$forcecombo) { if (!$forcecombo) {
include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
$events = array();
$out .= ajax_combobox($htmlname, $events, getDolGlobalInt("PRODUIT_USE_SEARCH_TO_SELECT")); $out .= ajax_combobox($htmlname, $events, getDolGlobalInt("PRODUIT_USE_SEARCH_TO_SELECT"));
} }
@ -4192,6 +4195,7 @@ class Form
} }
} }
$out .= '>'; $out .= '>';
$value = '';
if ($format == 0) { if ($format == 0) {
$value = ($maxlength ?dol_trunc($arraytypes['label'], $maxlength) : $arraytypes['label']); $value = ($maxlength ?dol_trunc($arraytypes['label'], $maxlength) : $arraytypes['label']);
} elseif ($format == 1) { } elseif ($format == 1) {
@ -6333,6 +6337,9 @@ class Form
// Analysis of the pre-selection date // Analysis of the pre-selection date
$reg = array(); $reg = array();
$shour = '';
$smin = '';
$ssec = '';
if (preg_match('/^([0-9]+)\-([0-9]+)\-([0-9]+)\s?([0-9]+)?:?([0-9]+)?/', $set_time, $reg)) { // deprecated usage if (preg_match('/^([0-9]+)\-([0-9]+)\-([0-9]+)\s?([0-9]+)?:?([0-9]+)?/', $set_time, $reg)) { // deprecated usage
// Date format 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS' // Date format 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS'
$syear = (!empty($reg[1]) ? $reg[1] : ''); $syear = (!empty($reg[1]) ? $reg[1] : '');
@ -6349,10 +6356,6 @@ class Form
$shour = dol_print_date($set_time, "%H", $gm); $shour = dol_print_date($set_time, "%H", $gm);
$smin = dol_print_date($set_time, "%M", $gm); $smin = dol_print_date($set_time, "%M", $gm);
$ssec = dol_print_date($set_time, "%S", $gm); $ssec = dol_print_date($set_time, "%S", $gm);
} else {
$shour = '';
$smin = '';
$ssec = '';
} }
} else { } else {
// Date est '' ou vaut -1 // Date est '' ou vaut -1
@ -6878,6 +6881,7 @@ class Form
unset($tickettmpselect); unset($tickettmpselect);
} }
$urloption = '';
$out .= ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/ticket/ajax/tickets.php', $urloption, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT, 1, $ajaxoptions); $out .= ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/ticket/ajax/tickets.php', $urloption, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT, 1, $ajaxoptions);
if (empty($hidelabel)) $out .= $langs->trans("RefOrLabel").' : '; if (empty($hidelabel)) $out .= $langs->trans("RefOrLabel").' : ';
@ -7020,16 +7024,11 @@ class Form
protected function constructTicketListOption(&$objp, &$opt, &$optJson, $selected, $filterkey = '') protected function constructTicketListOption(&$objp, &$opt, &$optJson, $selected, $filterkey = '')
{ {
$outkey = ''; $outkey = '';
$outval = '';
$outref = ''; $outref = '';
$outlabel = '';
$outtype = ''; $outtype = '';
$label = $objp->label;
$outkey = $objp->rowid; $outkey = $objp->rowid;
$outref = $objp->ref; $outref = $objp->ref;
$outlabel = $objp->label;
$outtype = $objp->fk_product_type; $outtype = $objp->fk_product_type;
$opt = '<option value="'.$objp->rowid.'"'; $opt = '<option value="'.$objp->rowid.'"';
@ -7038,10 +7037,9 @@ class Form
$opt .= $objp->ref; $opt .= $objp->ref;
$objRef = $objp->ref; $objRef = $objp->ref;
if (!empty($filterkey) && $filterkey != '') $objRef = preg_replace('/('.preg_quote($filterkey, '/').')/i', '<strong>$1</strong>', $objRef, 1); if (!empty($filterkey) && $filterkey != '') $objRef = preg_replace('/('.preg_quote($filterkey, '/').')/i', '<strong>$1</strong>', $objRef, 1);
$outval .= $objRef;
$opt .= "</option>\n"; $opt .= "</option>\n";
$optJson = array('key'=>$outkey, 'value'=>$outref, 'type'=>$outtypem); $optJson = array('key'=>$outkey, 'value'=>$outref, 'type'=>$outtype);
} }
/** /**
@ -7648,6 +7646,7 @@ class Form
$out = ''; $out = '';
$outarray = array(); $outarray = array();
$tmparray = array();
$num = 0; $num = 0;
@ -9353,10 +9352,12 @@ class Form
global $conf, $user, $langs; global $conf, $user, $langs;
// Permettre l'exclusion de groupes // Permettre l'exclusion de groupes
$excludeGroups = null;
if (is_array($exclude)) { if (is_array($exclude)) {
$excludeGroups = implode(",", $exclude); $excludeGroups = implode(",", $exclude);
} }
// Permettre l'inclusion de groupes // Permettre l'inclusion de groupes
$includeGroups = null;
if (is_array($include)) { if (is_array($include)) {
$includeGroups = implode(",", $include); $includeGroups = implode(",", $include);
} }
@ -9920,7 +9921,7 @@ class Form
//if ($disabled) $out.=' disabled'; // with select2, field can't be preselected if disabled //if ($disabled) $out.=' disabled'; // with select2, field can't be preselected if disabled
$out .= '>' . $labeltoshow . '</option>'; $out .= '>' . $labeltoshow . '</option>';
} else { } else {
if ($hideunselectables && $disabled && ($selected != $obj->rowid)) { if ($disabled && ($selected != $obj->rowid)) {
$resultat = ''; $resultat = '';
} else { } else {
$resultat = '<option value="' . $obj->rowid . '"'; $resultat = '<option value="' . $obj->rowid . '"';

View File

@ -73,6 +73,7 @@ class FormTicket
public $ispublic; // To show information or not into public form public $ispublic; // To show information or not into public form
public $withtitletopic; public $withtitletopic;
public $withtopicreadonly;
public $withcompany; // affiche liste déroulante company public $withcompany; // affiche liste déroulante company
public $withfromsocid; public $withfromsocid;
public $withfromcontactid; public $withfromcontactid;
@ -84,6 +85,11 @@ class FormTicket
public $withcancel; public $withcancel;
public $type_code;
public $category_code;
public $severity_code;
/** /**
* *
* @var array $substit Substitutions * @var array $substit Substitutions
@ -113,7 +119,7 @@ class FormTicket
$this->withcompany = $conf->societe->enabled ? 1 : 0; $this->withcompany = $conf->societe->enabled ? 1 : 0;
$this->withfromsocid = 0; $this->withfromsocid = 0;
$this->withfromcontactid = 0; $this->withfromcontactid = 0;
//$this->withthreadid=0; //$this->withreadid=0;
//$this->withtitletopic=''; //$this->withtitletopic='';
$this->withnotifytiersatcreate = 0; $this->withnotifytiersatcreate = 0;
$this->withusercreate = 1; $this->withusercreate = 1;
@ -280,6 +286,7 @@ class FormTicket
} }
// If ticket created from another object // If ticket created from another object
$subelement = '';
if (isset($this->param['origin']) && $this->param['originid'] > 0) { if (isset($this->param['origin']) && $this->param['originid'] > 0) {
// Parse element/subelement (ex: project_task) // Parse element/subelement (ex: project_task)
$element = $subelement = $this->param['origin']; $element = $subelement = $this->param['origin'];
@ -331,8 +338,8 @@ class FormTicket
print $langs->trans('SubjectAnswerToTicket').' '.$this->topic_title; print $langs->trans('SubjectAnswerToTicket').' '.$this->topic_title;
print '</td></tr>'; print '</td></tr>';
} else { } else {
if ($this->withthreadid > 0) { if ($this->withreadid > 0) {
$subject = $langs->trans('SubjectAnswerToTicket').' '.$this->withthreadid.' : '.$this->topic_title.''; $subject = $langs->trans('SubjectAnswerToTicket').' '.$this->withreadid.' : '.$this->topic_title.'';
} }
print '<input class="text minwidth500" id="subject" name="subject" value="'.(GETPOST('subject', 'alpha') ? GETPOST('subject', 'alpha') : $subject).'" autofocus />'; print '<input class="text minwidth500" id="subject" name="subject" value="'.(GETPOST('subject', 'alpha') ? GETPOST('subject', 'alpha') : $subject).'" autofocus />';
print '</td></tr>'; print '</td></tr>';
@ -628,11 +635,11 @@ class FormTicket
print '<br>'; print '<br>';
print $form->buttonsSaveCancel((($this->withthreadid > 0) ? "SendResponse" : "CreateTicket"), ($this->withcancel ? "Cancel" : "")); print $form->buttonsSaveCancel((($this->withreadid > 0) ? "SendResponse" : "CreateTicket"), ($this->withcancel ? "Cancel" : ""));
/* /*
print '<div class="center">'; print '<div class="center">';
print '<input type="submit" class="button" name="add" value="'.$langs->trans(($this->withthreadid > 0 ? "SendResponse" : "CreateTicket")).'" />'; print '<input type="submit" class="button" name="add" value="'.$langs->trans(($this->withreadid > 0 ? "SendResponse" : "CreateTicket")).'" />';
if ($this->withcancel) { if ($this->withcancel) {
print " &nbsp; &nbsp; &nbsp;"; print " &nbsp; &nbsp; &nbsp;";
print '<input class="button button-cancel" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">'; print '<input class="button button-cancel" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">';
@ -1365,6 +1372,9 @@ class FormTicket
// External users can't send message email // External users can't send message email
if ($user->rights->ticket->write && !$user->socid) { if ($user->rights->ticket->write && !$user->socid) {
$ticketstat = new Ticket($this->db);
$res = $ticketstat->fetch('', '', $this->track_id);
print '<tr><td></td><td>'; print '<tr><td></td><td>';
$checkbox_selected = (GETPOST('send_email') == "1" ? ' checked' : ($conf->global->TICKETS_MESSAGE_FORCE_MAIL?'checked':'')); $checkbox_selected = (GETPOST('send_email') == "1" ? ' checked' : ($conf->global->TICKETS_MESSAGE_FORCE_MAIL?'checked':''));
print '<input type="checkbox" name="send_email" value="1" id="send_msg_email" '.$checkbox_selected.'/> '; print '<input type="checkbox" name="send_email" value="1" id="send_msg_email" '.$checkbox_selected.'/> ';
@ -1395,18 +1405,18 @@ class FormTicket
// Subject // Subject
print '<tr class="email_line"><td>'.$langs->trans('Subject').'</td>'; print '<tr class="email_line"><td>'.$langs->trans('Subject').'</td>';
print '<td><input type="text" class="text minwidth500" name="subject" value="['.$conf->global->MAIN_INFO_SOCIETE_NOM.' - '.$langs->trans("Ticket").' '.$this->ref.'] '.$langs->trans('TicketNewMessage').'" />'; print '<td><input type="text" class="text minwidth500" name="subject" value="['.$conf->global->MAIN_INFO_SOCIETE_NOM.' - '.$langs->trans("Ticket").' '.$ticketstat->ref.'] '.$langs->trans('TicketNewMessage').'" />';
print '</td></tr>'; print '</td></tr>';
// Destinataires // Destinataires
print '<tr class="email_line"><td>'.$langs->trans('MailRecipients').'</td><td>'; print '<tr class="email_line"><td>'.$langs->trans('MailRecipients').'</td><td>';
$ticketstat = new Ticket($this->db);
$res = $ticketstat->fetch('', '', $this->track_id);
if ($res) { if ($res) {
// Retrieve email of all contacts (internal and external) // Retrieve email of all contacts (internal and external)
$contacts = $ticketstat->getInfosTicketInternalContact(); $contacts = $ticketstat->getInfosTicketInternalContact();
$contacts = array_merge($contacts, $ticketstat->getInfosTicketExternalContact()); $contacts = array_merge($contacts, $ticketstat->getInfosTicketExternalContact());
$sendto = array();
// Build array to display recipient list // Build array to display recipient list
if (is_array($contacts) && count($contacts) > 0) { if (is_array($contacts) && count($contacts) > 0) {
foreach ($contacts as $key => $info_sendto) { foreach ($contacts as $key => $info_sendto) {
@ -1416,7 +1426,7 @@ class FormTicket
} }
} }
if ($ticketstat->origin_email && !in_array($this->dao->origin_email, $sendto)) { if ($ticketstat->origin_email && !in_array($ticketstat->origin_email, $sendto)) {
$sendto[] = dol_escape_htmltag($ticketstat->origin_email).' <small class="opacitymedium">('.$langs->trans("TicketEmailOriginIssuer").")</small>"; $sendto[] = dol_escape_htmltag($ticketstat->origin_email).' <small class="opacitymedium">('.$langs->trans("TicketEmailOriginIssuer").")</small>";
} }

View File

@ -63,6 +63,14 @@ class CommActionRapport
public $marge_basse; public $marge_basse;
public $format;
public $type;
public $page_hauteur;
public $page_largeur;
/** /**
* Constructor * Constructor

View File

@ -89,7 +89,6 @@ class doc_generic_asset_odt extends ModelePDFAsset
$this->option_tva = 0; // Manage the vat option FACTURE_TVAOPTION $this->option_tva = 0; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 0; // Display payment mode $this->option_modereg = 0; // Display payment mode
$this->option_condreg = 0; // Display payment terms $this->option_condreg = 0; // Display payment terms
$this->option_codeproduitservice = 0; // Display product-service code
$this->option_multilang = 1; // Available in several languages $this->option_multilang = 1; // Available in several languages
$this->option_escompte = 0; // Displays if there has been a discount $this->option_escompte = 0; // Displays if there has been a discount
$this->option_credit_note = 0; // Support credit notes $this->option_credit_note = 0; // Support credit notes

View File

@ -74,7 +74,6 @@ class pdf_ban extends ModeleBankAccountDoc
$this->option_logo = 1; // Display logo FAC_PDF_LOGO $this->option_logo = 1; // Display logo FAC_PDF_LOGO
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_codeproduitservice = 1; // Display product-service code
// Retrieves transmitter // Retrieves transmitter
$this->emetteur = $mysoc; $this->emetteur = $mysoc;

View File

@ -79,7 +79,6 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$this->option_logo = 1; // Display logo FAC_PDF_LOGO $this->option_logo = 1; // Display logo FAC_PDF_LOGO
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_codeproduitservice = 1; //Display product-service code
// Retrieves transmitter // Retrieves transmitter
$this->emetteur = $mysoc; $this->emetteur = $mysoc;

View File

@ -90,7 +90,6 @@ class doc_generic_order_odt extends ModelePDFCommandes
$this->option_tva = 0; // Manage the vat option COMMANDE_TVAOPTION $this->option_tva = 0; // Manage the vat option COMMANDE_TVAOPTION
$this->option_modereg = 0; // Display payment mode $this->option_modereg = 0; // Display payment mode
$this->option_condreg = 0; // Display payment terms $this->option_condreg = 0; // Display payment terms
$this->option_codeproduitservice = 0; // Display product-service code
$this->option_multilang = 1; // Available in several languages $this->option_multilang = 1; // Available in several languages
$this->option_escompte = 0; // Displays if there has been a discount $this->option_escompte = 0; // Displays if there has been a discount
$this->option_credit_note = 0; // Support credit notes $this->option_credit_note = 0; // Support credit notes

View File

@ -158,7 +158,6 @@ class pdf_einstein extends ModelePDFCommandes
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 1; // Display payment mode $this->option_modereg = 1; // Display payment mode
$this->option_condreg = 1; // Display payment terms $this->option_condreg = 1; // Display payment terms
$this->option_codeproduitservice = 1; // Display product-service code
$this->option_multilang = 1; // Available in several languages $this->option_multilang = 1; // Available in several languages
$this->option_escompte = 0; // Displays if there has been a discount $this->option_escompte = 0; // Displays if there has been a discount
$this->option_credit_note = 0; // Support credit notes $this->option_credit_note = 0; // Support credit notes

View File

@ -163,7 +163,6 @@ class pdf_eratosthene extends ModelePDFCommandes
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 1; // Display payment mode $this->option_modereg = 1; // Display payment mode
$this->option_condreg = 1; // Display payment terms $this->option_condreg = 1; // Display payment terms
$this->option_codeproduitservice = 1; // Display product-service code
$this->option_multilang = 1; // Available in several languages $this->option_multilang = 1; // Available in several languages
$this->option_escompte = 0; // Displays if there has been a discount $this->option_escompte = 0; // Displays if there has been a discount
$this->option_credit_note = 0; // Support credit notes $this->option_credit_note = 0; // Support credit notes

View File

@ -88,7 +88,6 @@ class doc_generic_contract_odt extends ModelePDFContract
$this->option_tva = 0; // Manage the vat CONTRACT_TVAOPTION $this->option_tva = 0; // Manage the vat CONTRACT_TVAOPTION
$this->option_modereg = 0; // Display payment mode $this->option_modereg = 0; // Display payment mode
$this->option_condreg = 0; // Display payment terms $this->option_condreg = 0; // Display payment terms
$this->option_codeproduitservice = 0; // Display product-service code
$this->option_multilang = 1; // Available in several languages $this->option_multilang = 1; // Available in several languages
$this->option_escompte = 0; // Displays if there has been a discount $this->option_escompte = 0; // Displays if there has been a discount
$this->option_credit_note = 0; // Support credit notes $this->option_credit_note = 0; // Support credit notes

View File

@ -154,7 +154,6 @@ class pdf_strato extends ModelePDFContract
$this->option_tva = 0; // Manage the vat option FACTURE_TVAOPTION $this->option_tva = 0; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 0; // Display payment mode $this->option_modereg = 0; // Display payment mode
$this->option_condreg = 0; // Display payment terms $this->option_condreg = 0; // Display payment terms
$this->option_codeproduitservice = 0; // Display product-service code
$this->option_multilang = 0; // Available in several languages $this->option_multilang = 0; // Available in several languages
$this->option_draft_watermark = 1; // Support add of a watermark on drafts $this->option_draft_watermark = 1; // Support add of a watermark on drafts

View File

@ -147,7 +147,6 @@ class pdf_storm extends ModelePDFDeliveryOrder
$this->option_logo = 1; // Display logo FAC_PDF_LOGO $this->option_logo = 1; // Display logo FAC_PDF_LOGO
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_codeproduitservice = 1; // Display product-service code
// Get source company // Get source company
$this->emetteur = $mysoc; $this->emetteur = $mysoc;

View File

@ -146,7 +146,6 @@ class pdf_typhon extends ModelePDFDeliveryOrder
$this->option_logo = 1; // Display logo FAC_PDF_LOGO $this->option_logo = 1; // Display logo FAC_PDF_LOGO
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_codeproduitservice = 1; // Display product-service code
// Get source company // Get source company
$this->emetteur = $mysoc; $this->emetteur = $mysoc;

View File

@ -90,7 +90,6 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
$this->option_tva = 0; // Manage the vat option EXPEDITION_TVAOPTION $this->option_tva = 0; // Manage the vat option EXPEDITION_TVAOPTION
$this->option_modereg = 0; // Display payment mode $this->option_modereg = 0; // Display payment mode
$this->option_condreg = 0; // Display payment terms $this->option_condreg = 0; // Display payment terms
$this->option_codeproduitservice = 0; // Display product-service code
$this->option_multilang = 1; // Available in several languages $this->option_multilang = 1; // Available in several languages
$this->option_escompte = 0; // Displays if there has been a discount $this->option_escompte = 0; // Displays if there has been a discount
$this->option_credit_note = 0; // Support credit notes $this->option_credit_note = 0; // Support credit notes

View File

@ -122,6 +122,14 @@ class pdf_standard extends ModeleExpenseReport
*/ */
public $emetteur; public $emetteur;
public $posxpiece;
public $posxcomment;
public $posxtva;
public $posxup;
public $posxqty;
public $postotalht;
public $postotalttc;
/** /**
* Constructor * Constructor
@ -155,7 +163,6 @@ class pdf_standard extends ModeleExpenseReport
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 1; // Display payment mode $this->option_modereg = 1; // Display payment mode
$this->option_condreg = 1; // Display payment terms $this->option_condreg = 1; // Display payment terms
$this->option_codeproduitservice = 1; // Display product-service code
$this->option_multilang = 1; // Available in several languages $this->option_multilang = 1; // Available in several languages
$this->option_escompte = 0; // Displays if there has been a discount $this->option_escompte = 0; // Displays if there has been a discount
$this->option_credit_note = 0; // Support credit notes $this->option_credit_note = 0; // Support credit notes

View File

@ -89,7 +89,6 @@ class doc_generic_invoice_odt extends ModelePDFFactures
$this->option_tva = 0; // Manage the vat option FACTURE_TVAOPTION $this->option_tva = 0; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 0; // Display payment mode $this->option_modereg = 0; // Display payment mode
$this->option_condreg = 0; // Display payment terms $this->option_condreg = 0; // Display payment terms
$this->option_codeproduitservice = 0; // Display product-service code
$this->option_multilang = 1; // Available in several languages $this->option_multilang = 1; // Available in several languages
$this->option_escompte = 0; // Displays if there has been a discount $this->option_escompte = 0; // Displays if there has been a discount
$this->option_credit_note = 0; // Support credit notes $this->option_credit_note = 0; // Support credit notes

View File

@ -164,7 +164,6 @@ class pdf_crabe extends ModelePDFFactures
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 1; // Display payment mode $this->option_modereg = 1; // Display payment mode
$this->option_condreg = 1; // Display payment terms $this->option_condreg = 1; // Display payment terms
$this->option_codeproduitservice = 1; // Display product-service code
$this->option_multilang = 1; // Available in several languages $this->option_multilang = 1; // Available in several languages
$this->option_escompte = 1; // Displays if there has been a discount $this->option_escompte = 1; // Displays if there has been a discount
$this->option_credit_note = 1; // Support credit notes $this->option_credit_note = 1; // Support credit notes

View File

@ -165,7 +165,6 @@ class pdf_sponge extends ModelePDFFactures
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 1; // Display payment mode $this->option_modereg = 1; // Display payment mode
$this->option_condreg = 1; // Display payment terms $this->option_condreg = 1; // Display payment terms
$this->option_codeproduitservice = 1; // Display product-service code
$this->option_multilang = 1; // Available in several languages $this->option_multilang = 1; // Available in several languages
$this->option_escompte = 1; // Displays if there has been a discount $this->option_escompte = 1; // Displays if there has been a discount
$this->option_credit_note = 1; // Support credit notes $this->option_credit_note = 1; // Support credit notes

View File

@ -146,7 +146,6 @@ class pdf_soleil extends ModelePDFFicheinter
$this->option_tva = 0; // Manage the vat option FACTURE_TVAOPTION $this->option_tva = 0; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 0; // Display payment mode $this->option_modereg = 0; // Display payment mode
$this->option_condreg = 0; // Display payment terms $this->option_condreg = 0; // Display payment terms
$this->option_codeproduitservice = 0; // Display product-service code
$this->option_multilang = 1; // Available in several languages $this->option_multilang = 1; // Available in several languages
$this->option_draft_watermark = 1; // Support add of a watermark on drafts $this->option_draft_watermark = 1; // Support add of a watermark on drafts

View File

@ -85,7 +85,6 @@ class doc_generic_member_odt extends ModelePDFMember
$this->option_tva = 0; // Manage the vat option FACTURE_TVAOPTION $this->option_tva = 0; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 0; // Display payment mode $this->option_modereg = 0; // Display payment mode
$this->option_condreg = 0; // Display payment terms $this->option_condreg = 0; // Display payment terms
$this->option_codeproduitservice = 0; // Display product-service code
$this->option_multilang = 1; // Available in several languages $this->option_multilang = 1; // Available in several languages
$this->option_escompte = 0; // Displays if there has been a discount $this->option_escompte = 0; // Displays if there has been a discount
$this->option_credit_note = 0; // Support credit notes $this->option_credit_note = 0; // Support credit notes

View File

@ -110,6 +110,19 @@ class pdf_standard extends ModelePDFMovement
public $emetteur; public $emetteur;
public $wref;
public $posxidref;
public $posxdatemouv;
public $posxdesc;
public $posxlabel;
public $posxtva;
public $posxqty;
public $posxup;
public $posxunit;
public $posxdiscount;
public $postotalht;
/** /**
* Constructor * Constructor
* *
@ -174,11 +187,6 @@ class pdf_standard extends ModelePDFMovement
$this->posxdiscount -= 20; $this->posxdiscount -= 20;
$this->postotalht -= 20; $this->postotalht -= 20;
} }
$this->tva = array();
$this->localtax1 = array();
$this->localtax2 = array();
$this->atleastoneratenotnull = 0;
$this->atleastonediscount = 0;
} }
@ -395,19 +403,6 @@ class pdf_standard extends ModelePDFMovement
} }
$num = $this->db->num_rows($resql); $num = $this->db->num_rows($resql);
$arrayofselected = is_array($toselect) ? $toselect : array();
$i = 0;
$help_url = 'EN:Module_Stocks_En|FR:Module_Stock|ES:M&oacute;dulo_Stocks';
if ($msid) {
$texte = $langs->trans('StockMovementForId', $msid);
} else {
$texte = $langs->trans("ListOfStockMovements");
if ($id) {
$texte .= ' ('.$langs->trans("ForThisWarehouse").')';
}
}
} }
// Definition of $dir and $file // Definition of $dir and $file

View File

@ -35,6 +35,8 @@ abstract class ModelePDFMovement extends CommonDocGenerator
*/ */
public $error = ''; public $error = '';
public $option_codestockservice;
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**

View File

@ -89,7 +89,6 @@ class doc_generic_mo_odt extends ModelePDFMo
$this->option_tva = 0; // Manage the vat option $this->option_tva = 0; // Manage the vat option
$this->option_modereg = 0; // Display payment mode $this->option_modereg = 0; // Display payment mode
$this->option_condreg = 0; // Display payment terms $this->option_condreg = 0; // Display payment terms
$this->option_codeproduitservice = 0; // Display product-service code
$this->option_multilang = 1; // Available in several languages $this->option_multilang = 1; // Available in several languages
$this->option_escompte = 0; // Displays if there has been a discount $this->option_escompte = 0; // Displays if there has been a discount
$this->option_credit_note = 0; // Support credit notes $this->option_credit_note = 0; // Support credit notes

View File

@ -150,7 +150,6 @@ class pdf_vinci extends ModelePDFMo
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
$this->option_logo = 1; // Display logo $this->option_logo = 1; // Display logo
$this->option_codeproduitservice = 1; // Display product-service code
$this->option_multilang = 1; //Available in several languages $this->option_multilang = 1; //Available in several languages
$this->option_escompte = 0; // Displays if there has been a discount $this->option_escompte = 0; // Displays if there has been a discount
$this->option_credit_note = 0; // Support credit notes $this->option_credit_note = 0; // Support credit notes

View File

@ -87,7 +87,6 @@ class doc_generic_product_odt extends ModelePDFProduct
$this->option_tva = 0; // Manage the vat option PRODUCT_TVAOPTION $this->option_tva = 0; // Manage the vat option PRODUCT_TVAOPTION
$this->option_modereg = 0; // Display payment mode $this->option_modereg = 0; // Display payment mode
$this->option_condreg = 0; // Display payment terms $this->option_condreg = 0; // Display payment terms
$this->option_codeproduitservice = 0; // Display product-service code
$this->option_multilang = 1; // Available in several languages $this->option_multilang = 1; // Available in several languages
$this->option_escompte = 0; // Displays if there has been a discount $this->option_escompte = 0; // Displays if there has been a discount
$this->option_credit_note = 0; // Support credit notes $this->option_credit_note = 0; // Support credit notes

View File

@ -138,7 +138,6 @@ class pdf_standard extends ModelePDFProduct
$this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
$this->option_logo = 1; // Display logo $this->option_logo = 1; // Display logo
$this->option_codeproduitservice = 0; // Display product-service code
$this->option_multilang = 1; // Available in several languages $this->option_multilang = 1; // Available in several languages
$this->option_freetext = 0; // Support add of a personalised text $this->option_freetext = 0; // Support add of a personalised text

View File

@ -124,7 +124,6 @@ class doc_generic_project_odt extends ModelePDFProjects
$this->option_tva = 0; // Manage the vat option COMMANDE_TVAOPTION $this->option_tva = 0; // Manage the vat option COMMANDE_TVAOPTION
$this->option_modereg = 0; // Display payment mode $this->option_modereg = 0; // Display payment mode
$this->option_condreg = 0; // Display payment terms $this->option_condreg = 0; // Display payment terms
$this->option_codeproduitservice = 0; // Display product-service code
$this->option_multilang = 1; // Available in several languages $this->option_multilang = 1; // Available in several languages
$this->option_escompte = 0; // Displays if there has been a discount $this->option_escompte = 0; // Displays if there has been a discount
$this->option_credit_note = 0; // Support credit notes $this->option_credit_note = 0; // Support credit notes

View File

@ -146,7 +146,6 @@ class pdf_baleine extends ModelePDFProjects
$this->option_logo = 1; // Display logo FAC_PDF_LOGO $this->option_logo = 1; // Display logo FAC_PDF_LOGO
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_codeproduitservice = 1; // Display product-service code
// Get source company // Get source company
$this->emetteur = $mysoc; $this->emetteur = $mysoc;

View File

@ -174,7 +174,6 @@ class pdf_beluga extends ModelePDFProjects
$this->option_logo = 1; // Display logo FAC_PDF_LOGO $this->option_logo = 1; // Display logo FAC_PDF_LOGO
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_codeproduitservice = 1; // Display product-service code
// Get source company // Get source company
$this->emetteur = $mysoc; $this->emetteur = $mysoc;

View File

@ -145,7 +145,6 @@ class pdf_timespent extends ModelePDFProjects
$this->option_logo = 1; // Display logo FAC_PDF_LOGO $this->option_logo = 1; // Display logo FAC_PDF_LOGO
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_codeproduitservice = 1; // Display product-service code
// Get source company // Get source company
$this->emetteur = $mysoc; $this->emetteur = $mysoc;

View File

@ -125,7 +125,6 @@ class doc_generic_task_odt extends ModelePDFTask
$this->option_tva = 0; // Manage the vat option COMMANDE_TVAOPTION $this->option_tva = 0; // Manage the vat option COMMANDE_TVAOPTION
$this->option_modereg = 0; // Display payment mode $this->option_modereg = 0; // Display payment mode
$this->option_condreg = 0; // Display payment terms $this->option_condreg = 0; // Display payment terms
$this->option_codeproduitservice = 0; // Display product-service code
$this->option_multilang = 0; // Available in several languages $this->option_multilang = 0; // Available in several languages
$this->option_escompte = 0; // Displays if there has been a discount $this->option_escompte = 0; // Displays if there has been a discount
$this->option_credit_note = 0; // Support credit notes $this->option_credit_note = 0; // Support credit notes

View File

@ -87,7 +87,6 @@ class doc_generic_proposal_odt extends ModelePDFPropales
$this->option_tva = 0; // Manage the vat option PROPALE_TVAOPTION $this->option_tva = 0; // Manage the vat option PROPALE_TVAOPTION
$this->option_modereg = 0; // Display payment mode $this->option_modereg = 0; // Display payment mode
$this->option_condreg = 0; // Display payment terms $this->option_condreg = 0; // Display payment terms
$this->option_codeproduitservice = 0; // Display product-service code
$this->option_multilang = 1; // Available in several languages $this->option_multilang = 1; // Available in several languages
$this->option_escompte = 0; // Displays if there has been a discount $this->option_escompte = 0; // Displays if there has been a discount
$this->option_credit_note = 0; // Support credit notes $this->option_credit_note = 0; // Support credit notes

View File

@ -154,7 +154,6 @@ class pdf_azur extends ModelePDFPropales
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 1; // Display payment mode $this->option_modereg = 1; // Display payment mode
$this->option_condreg = 1; // Display payment terms $this->option_condreg = 1; // Display payment terms
$this->option_codeproduitservice = 1; // Display product-service code
$this->option_multilang = 1; // Available in several languages $this->option_multilang = 1; // Available in several languages
$this->option_escompte = 0; // Displays if there has been a discount $this->option_escompte = 0; // Displays if there has been a discount
$this->option_credit_note = 0; // Support credit notes $this->option_credit_note = 0; // Support credit notes

View File

@ -157,7 +157,6 @@ class pdf_cyan extends ModelePDFPropales
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 1; // Display payment mode $this->option_modereg = 1; // Display payment mode
$this->option_condreg = 1; // Display payment terms $this->option_condreg = 1; // Display payment terms
$this->option_codeproduitservice = 1; // Display product-service code
$this->option_multilang = 1; // Available in several languages $this->option_multilang = 1; // Available in several languages
$this->option_escompte = 0; // Displays if there has been a discount $this->option_escompte = 0; // Displays if there has been a discount
$this->option_credit_note = 0; // Support credit notes $this->option_credit_note = 0; // Support credit notes

View File

@ -83,7 +83,6 @@ class doc_generic_reception_odt extends ModelePdfReception
$this->option_tva = 0; // Manage the vat option RECEPTION_TVAOPTION $this->option_tva = 0; // Manage the vat option RECEPTION_TVAOPTION
$this->option_modereg = 0; // Display payment mode $this->option_modereg = 0; // Display payment mode
$this->option_condreg = 0; // Display payment terms $this->option_condreg = 0; // Display payment terms
$this->option_codeproduitservice = 0; // Display product-service code
$this->option_multilang = 1; // Available in several languages $this->option_multilang = 1; // Available in several languages
$this->option_escompte = 0; // Displays if there has been a discount $this->option_escompte = 0; // Displays if there has been a discount
$this->option_credit_note = 0; // Support credit notes $this->option_credit_note = 0; // Support credit notes

View File

@ -86,7 +86,6 @@ class doc_generic_stock_odt extends ModelePDFStock
$this->option_tva = 0; // Manage the vat option STOCK_TVAOPTION $this->option_tva = 0; // Manage the vat option STOCK_TVAOPTION
$this->option_modereg = 0; // Display payment mode $this->option_modereg = 0; // Display payment mode
$this->option_condreg = 0; // Display payment terms $this->option_condreg = 0; // Display payment terms
$this->option_codeproduitservice = 0; // Display product-service code
$this->option_multilang = 1; // Available in several languages $this->option_multilang = 1; // Available in several languages
$this->option_escompte = 0; // Displays if there has been a discount $this->option_escompte = 0; // Displays if there has been a discount
$this->option_credit_note = 0; // Support credit notes $this->option_credit_note = 0; // Support credit notes

View File

@ -150,7 +150,6 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 1; // Display payment mode $this->option_modereg = 1; // Display payment mode
$this->option_condreg = 1; // Display payment terms $this->option_condreg = 1; // Display payment terms
$this->option_codeproduitservice = 1; // Display product-service code
$this->option_multilang = 1; // Available in several languages $this->option_multilang = 1; // Available in several languages
// Define column position // Define column position

View File

@ -90,8 +90,6 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders
$this->option_tva = 0; // Manage the vat option COMMANDE_TVAOPTION $this->option_tva = 0; // Manage the vat option COMMANDE_TVAOPTION
$this->option_modereg = 0; // Display payment mode $this->option_modereg = 0; // Display payment mode
$this->option_condreg = 0; // Display payment terms $this->option_condreg = 0; // Display payment terms
$this->option_codeproduitservice = 0; // Display product-service code
$this->option_multilang = 1; // Available in several languages
$this->option_escompte = 0; // Displays if there has been a discount $this->option_escompte = 0; // Displays if there has been a discount
$this->option_credit_note = 0; // Support credit notes $this->option_credit_note = 0; // Support credit notes
$this->option_freetext = 1; // Support add of a personalised text $this->option_freetext = 1; // Support add of a personalised text

View File

@ -152,7 +152,6 @@ class pdf_cornas extends ModelePDFSuppliersOrders
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 1; // Display payment mode $this->option_modereg = 1; // Display payment mode
$this->option_condreg = 1; // Display payment terms $this->option_condreg = 1; // Display payment terms
$this->option_codeproduitservice = 1; // Display product-service code
$this->option_multilang = 1; //Available in several languages $this->option_multilang = 1; //Available in several languages
$this->option_escompte = 0; // Displays if there has been a discount $this->option_escompte = 0; // Displays if there has been a discount
$this->option_credit_note = 0; // Support credit notes $this->option_credit_note = 0; // Support credit notes

View File

@ -152,7 +152,6 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 1; // Display payment mode $this->option_modereg = 1; // Display payment mode
$this->option_condreg = 1; // Display payment terms $this->option_condreg = 1; // Display payment terms
$this->option_codeproduitservice = 1; // Display product-service code
$this->option_multilang = 1; // Available in several languages $this->option_multilang = 1; // Available in several languages
$this->option_escompte = 0; // Displays if there has been a discount $this->option_escompte = 0; // Displays if there has been a discount
$this->option_credit_note = 0; // Support credit notes $this->option_credit_note = 0; // Support credit notes

View File

@ -117,6 +117,14 @@ class pdf_standard extends ModelePDFSuppliersPayments
*/ */
public $emetteur; public $emetteur;
public $posxdate;
public $posxreffacturefourn;
public $posxreffacture;
public $posxtype;
public $posxtotalht;
public $posxtva;
public $posxtotalttc;
/** /**
* Constructor * Constructor

View File

@ -88,7 +88,6 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
$this->option_tva = 0; // Manage the vat option PROPALE_TVAOPTION $this->option_tva = 0; // Manage the vat option PROPALE_TVAOPTION
$this->option_modereg = 0; // Display payment mode $this->option_modereg = 0; // Display payment mode
$this->option_condreg = 0; // Display payment terms $this->option_condreg = 0; // Display payment terms
$this->option_codeproduitservice = 0; // Display product-service code
$this->option_multilang = 1; // Available in several languages $this->option_multilang = 1; // Available in several languages
$this->option_escompte = 0; // Displays if there has been a discount $this->option_escompte = 0; // Displays if there has been a discount
$this->option_credit_note = 0; // Support credit notes $this->option_credit_note = 0; // Support credit notes

View File

@ -149,7 +149,6 @@ class pdf_aurore extends ModelePDFSupplierProposal
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 1; // Display payment mode $this->option_modereg = 1; // Display payment mode
$this->option_condreg = 1; // Display payment terms $this->option_condreg = 1; // Display payment terms
$this->option_codeproduitservice = 1; // Display product-service code
$this->option_multilang = 1; // Available in several languages $this->option_multilang = 1; // Available in several languages
$this->option_escompte = 1; // Displays if there has been a discount $this->option_escompte = 1; // Displays if there has been a discount
$this->option_credit_note = 1; // Support credit notes $this->option_credit_note = 1; // Support credit notes

View File

@ -85,7 +85,6 @@ class doc_generic_user_odt extends ModelePDFUser
$this->option_tva = 0; // Manage the vat option USER_TVAOPTION $this->option_tva = 0; // Manage the vat option USER_TVAOPTION
$this->option_modereg = 0; // Display payment mode $this->option_modereg = 0; // Display payment mode
$this->option_condreg = 0; // Display payment terms $this->option_condreg = 0; // Display payment terms
$this->option_codeproduitservice = 0; // Display product-service code
$this->option_multilang = 1; // Available in several languages $this->option_multilang = 1; // Available in several languages
$this->option_escompte = 0; // Displays if there has been a discount $this->option_escompte = 0; // Displays if there has been a discount
$this->option_credit_note = 0; // Support credit notes $this->option_credit_note = 0; // Support credit notes

View File

@ -88,7 +88,6 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup
$this->option_tva = 0; // Manage the vat option USERGROUP_TVAOPTION $this->option_tva = 0; // Manage the vat option USERGROUP_TVAOPTION
$this->option_modereg = 0; // Display payment mode $this->option_modereg = 0; // Display payment mode
$this->option_condreg = 0; // Display payment terms $this->option_condreg = 0; // Display payment terms
$this->option_codeproduitservice = 0; // Display product-service code
$this->option_multilang = 1; // Available in several languages $this->option_multilang = 1; // Available in several languages
$this->option_escompte = 0; // Displays if there has been a discount $this->option_escompte = 0; // Displays if there has been a discount
$this->option_credit_note = 0; // Support credit notes $this->option_credit_note = 0; // Support credit notes

View File

@ -89,7 +89,6 @@ class doc_generic_myobject_odt extends ModelePDFMyObject
$this->option_tva = 0; // Manage the vat option FACTURE_TVAOPTION $this->option_tva = 0; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 0; // Display payment mode $this->option_modereg = 0; // Display payment mode
$this->option_condreg = 0; // Display payment terms $this->option_condreg = 0; // Display payment terms
$this->option_codeproduitservice = 0; // Display product-service code
$this->option_multilang = 1; // Available in several languages $this->option_multilang = 1; // Available in several languages
$this->option_escompte = 0; // Displays if there has been a discount $this->option_escompte = 0; // Displays if there has been a discount
$this->option_credit_note = 0; // Support credit notes $this->option_credit_note = 0; // Support credit notes

View File

@ -2303,6 +2303,7 @@ class Product extends CommonObject
//PMP per entity & Stocks Sharings stock_reel includes only stocks shared with this entity //PMP per entity & Stocks Sharings stock_reel includes only stocks shared with this entity
$separatedEntityPMP = false; // Set to true to get the AWP from table llx_product_perentity instead of field 'pmp' into llx_product. $separatedEntityPMP = false; // Set to true to get the AWP from table llx_product_perentity instead of field 'pmp' into llx_product.
$separatedStock = false; // Set to true will count stock from subtable llx_product_stock. It is slower than using denormalized field 'stock', but it is required when using multientity and shared warehouses. $separatedStock = false; // Set to true will count stock from subtable llx_product_stock. It is slower than using denormalized field 'stock', but it is required when using multientity and shared warehouses.
$visibleWarehousesEntities = $conf->entity;
if (!empty($conf->global->MULTICOMPANY_PRODUCT_SHARING_ENABLED)) { if (!empty($conf->global->MULTICOMPANY_PRODUCT_SHARING_ENABLED)) {
if (!empty($conf->global->MULTICOMPANY_PMP_PER_ENTITY_ENABLED)) { if (!empty($conf->global->MULTICOMPANY_PMP_PER_ENTITY_ENABLED)) {
$checkPMPPerEntity = $this->db->query("SELECT pmp FROM " . $this->db->prefix() . "product_perentity WHERE fk_product = ".((int) $id)." AND entity = ".(int) $conf->entity); $checkPMPPerEntity = $this->db->query("SELECT pmp FROM " . $this->db->prefix() . "product_perentity WHERE fk_product = ".((int) $id)." AND entity = ".(int) $conf->entity);
@ -2312,7 +2313,6 @@ class Product extends CommonObject
} }
global $mc; global $mc;
$separatedStock = true; $separatedStock = true;
$visibleWarehousesEntities = $conf->entity;
if (isset($mc->sharings['stock']) && !empty($mc->sharings['stock'])) { if (isset($mc->sharings['stock']) && !empty($mc->sharings['stock'])) {
$visibleWarehousesEntities .= "," . implode(",", $mc->sharings['stock']); $visibleWarehousesEntities .= "," . implode(",", $mc->sharings['stock']);
} }
@ -2746,7 +2746,7 @@ class Product extends CommonObject
public function load_stats_bom($socid = 0) public function load_stats_bom($socid = 0)
{ {
// phpcs:enable // phpcs:enable
global $user, $hookmanager; global $user, $hookmanager, $action;
$error = 0; $error = 0;
@ -2815,7 +2815,7 @@ class Product extends CommonObject
public function load_stats_propale($socid = 0) public function load_stats_propale($socid = 0)
{ {
// phpcs:enable // phpcs:enable
global $conf, $user, $hookmanager; global $conf, $user, $hookmanager, $action;
$sql = "SELECT COUNT(DISTINCT p.fk_soc) as nb_customers, COUNT(DISTINCT p.rowid) as nb,"; $sql = "SELECT COUNT(DISTINCT p.fk_soc) as nb_customers, COUNT(DISTINCT p.rowid) as nb,";
$sql .= " COUNT(pd.rowid) as nb_rows, SUM(pd.qty) as qty"; $sql .= " COUNT(pd.rowid) as nb_rows, SUM(pd.qty) as qty";
@ -2946,7 +2946,7 @@ class Product extends CommonObject
public function load_stats_commande($socid = 0, $filtrestatut = '', $forVirtualStock = 0) public function load_stats_commande($socid = 0, $filtrestatut = '', $forVirtualStock = 0)
{ {
// phpcs:enable // phpcs:enable
global $conf, $user, $hookmanager; global $conf, $user, $hookmanager, $action;
$sql = "SELECT COUNT(DISTINCT c.fk_soc) as nb_customers, COUNT(DISTINCT c.rowid) as nb,"; $sql = "SELECT COUNT(DISTINCT c.fk_soc) as nb_customers, COUNT(DISTINCT c.rowid) as nb,";
$sql .= " COUNT(cd.rowid) as nb_rows, SUM(cd.qty) as qty"; $sql .= " COUNT(cd.rowid) as nb_rows, SUM(cd.qty) as qty";
@ -3106,7 +3106,7 @@ class Product extends CommonObject
public function load_stats_sending($socid = 0, $filtrestatut = '', $forVirtualStock = 0, $filterShipmentStatus = '') public function load_stats_sending($socid = 0, $filtrestatut = '', $forVirtualStock = 0, $filterShipmentStatus = '')
{ {
// phpcs:enable // phpcs:enable
global $conf, $user, $hookmanager; global $conf, $user, $hookmanager, $action;
$sql = "SELECT COUNT(DISTINCT e.fk_soc) as nb_customers, COUNT(DISTINCT e.rowid) as nb,"; $sql = "SELECT COUNT(DISTINCT e.fk_soc) as nb_customers, COUNT(DISTINCT e.rowid) as nb,";
$sql .= " COUNT(ed.rowid) as nb_rows, SUM(ed.qty) as qty"; $sql .= " COUNT(ed.rowid) as nb_rows, SUM(ed.qty) as qty";
@ -3248,7 +3248,7 @@ class Product extends CommonObject
public function load_stats_inproduction($socid = 0, $filtrestatut = '', $forVirtualStock = 0) public function load_stats_inproduction($socid = 0, $filtrestatut = '', $forVirtualStock = 0)
{ {
// phpcs:enable // phpcs:enable
global $conf, $user, $hookmanager; global $conf, $user, $hookmanager, $action;
$sql = "SELECT COUNT(DISTINCT m.fk_soc) as nb_customers, COUNT(DISTINCT m.rowid) as nb,"; $sql = "SELECT COUNT(DISTINCT m.fk_soc) as nb_customers, COUNT(DISTINCT m.rowid) as nb,";
$sql .= " COUNT(mp.rowid) as nb_rows, SUM(mp.qty) as qty, role"; $sql .= " COUNT(mp.rowid) as nb_rows, SUM(mp.qty) as qty, role";
@ -3341,7 +3341,7 @@ class Product extends CommonObject
public function load_stats_contrat($socid = 0) public function load_stats_contrat($socid = 0)
{ {
// phpcs:enable // phpcs:enable
global $conf, $user, $hookmanager; global $conf, $user, $hookmanager, $action;
$sql = "SELECT COUNT(DISTINCT c.fk_soc) as nb_customers, COUNT(DISTINCT c.rowid) as nb,"; $sql = "SELECT COUNT(DISTINCT c.fk_soc) as nb_customers, COUNT(DISTINCT c.rowid) as nb,";
$sql .= " COUNT(cd.rowid) as nb_rows, SUM(cd.qty) as qty"; $sql .= " COUNT(cd.rowid) as nb_rows, SUM(cd.qty) as qty";
@ -3415,7 +3415,7 @@ class Product extends CommonObject
public function load_stats_facture($socid = 0) public function load_stats_facture($socid = 0)
{ {
// phpcs:enable // phpcs:enable
global $db, $conf, $user, $hookmanager; global $db, $conf, $user, $hookmanager, $action;
$sql = "SELECT COUNT(DISTINCT f.fk_soc) as nb_customers, COUNT(DISTINCT f.rowid) as nb,"; $sql = "SELECT COUNT(DISTINCT f.fk_soc) as nb_customers, COUNT(DISTINCT f.rowid) as nb,";
$sql .= " COUNT(fd.rowid) as nb_rows, SUM(".$this->db->ifsql('f.type != 2', 'fd.qty', 'fd.qty * -1').") as qty"; $sql .= " COUNT(fd.rowid) as nb_rows, SUM(".$this->db->ifsql('f.type != 2', 'fd.qty', 'fd.qty * -1').") as qty";

View File

@ -121,7 +121,7 @@ if ($action == "view" || $action == "presend" || $action == "close" || $action =
if (!$error && $action == "add_message" && $display_ticket && GETPOSTISSET('btn_add_message')) if (!$error && $action == "add_message" && $display_ticket && GETPOSTISSET('btn_add_message'))
{ {
// TODO Add message... // TODO Add message...
$ret = $object->dao->newMessage($user, $action, 0, 1); $ret = $object->newMessage($user, $action, 0, 1);

View File

@ -362,7 +362,7 @@ if ($action == "view_ticketlist") {
} }
$sql .= " WHERE t.entity IN (".getEntity('ticket').")"; $sql .= " WHERE t.entity IN (".getEntity('ticket').")";
$sql .= " AND ((tc.source = 'external'"; $sql .= " AND ((tc.source = 'external'";
$sql .= " AND tc.element='".$db->escape($object->dao->element)."'"; $sql .= " AND tc.element='".$db->escape($object->element)."'";
$sql .= " AND tc.active=1)"; $sql .= " AND tc.active=1)";
$sql .= " OR (sp.email='".$db->escape($_SESSION['email_customer'])."'"; $sql .= " OR (sp.email='".$db->escape($_SESSION['email_customer'])."'";
$sql .= " OR s.email='".$db->escape($_SESSION['email_customer'])."'"; $sql .= " OR s.email='".$db->escape($_SESSION['email_customer'])."'";
@ -706,7 +706,7 @@ if ($action == "view_ticketlist") {
} }
} }
} else { } else {
print '<div class="error">Not Allowed<br><a href="'.$_SERVER['PHP_SELF'].'?track_id='.$object->dao->track_id.'">'.$langs->trans('Back').'</a></div>'; print '<div class="error">Not Allowed<br><a href="'.$_SERVER['PHP_SELF'].'?track_id='.$object->track_id.'">'.$langs->trans('Back').'</a></div>';
} }
} else { } else {
print '<p class="center">'.$langs->trans("TicketPublicMsgViewLogIn").'</p>'; print '<p class="center">'.$langs->trans("TicketPublicMsgViewLogIn").'</p>';

View File

@ -89,7 +89,6 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi
$this->option_tva = 0; // Manage the vat option COMMANDE_TVAOPTION $this->option_tva = 0; // Manage the vat option COMMANDE_TVAOPTION
$this->option_modereg = 0; // Display payment mode $this->option_modereg = 0; // Display payment mode
$this->option_condreg = 0; // Display payment terms $this->option_condreg = 0; // Display payment terms
$this->option_codeproduitservice = 0; // Display product-service code
$this->option_multilang = 1; // Available in several languages $this->option_multilang = 1; // Available in several languages
$this->option_escompte = 0; // Displays if there has been a discount $this->option_escompte = 0; // Displays if there has been a discount
$this->option_credit_note = 0; // Support credit notes $this->option_credit_note = 0; // Support credit notes

View File

@ -165,7 +165,6 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio
$this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION
$this->option_modereg = 1; // Display payment mode $this->option_modereg = 1; // Display payment mode
$this->option_condreg = 1; // Display payment terms $this->option_condreg = 1; // Display payment terms
$this->option_codeproduitservice = 1; // Display product-service code
$this->option_multilang = 1; // Available in several languages $this->option_multilang = 1; // Available in several languages
$this->option_escompte = 1; // Displays if there has been a discount $this->option_escompte = 1; // Displays if there has been a discount
$this->option_credit_note = 1; // Support credit notes $this->option_credit_note = 1; // Support credit notes