Merge branch 'Dolibarr:15.0' into 15.0
This commit is contained in:
commit
7cc9dbe5d4
@ -540,7 +540,7 @@ if ($action == 'create') {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Date document creation
|
// Date document export
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td class="titlefield">'.$langs->trans("DateExport").'</td>';
|
print '<td class="titlefield">'.$langs->trans("DateExport").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
@ -548,7 +548,7 @@ if ($action == 'create') {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Date document creation
|
// Date document validation
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td class="titlefield">'.$langs->trans("DateValidation").'</td>';
|
print '<td class="titlefield">'.$langs->trans("DateValidation").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
@ -607,6 +607,7 @@ if ($action == 'create') {
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
$result = $object->fetchAllPerMvt($piece_num, $mode); // This load $object->linesmvt
|
$result = $object->fetchAllPerMvt($piece_num, $mode); // This load $object->linesmvt
|
||||||
|
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
} else {
|
} else {
|
||||||
@ -647,11 +648,14 @@ if ($action == 'create') {
|
|||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Empty line is the first line of $object->linesmvt
|
// Add an empty line if there is not yet
|
||||||
// So we must get the first line (the empty one) and put it at the end of the array
|
if (!empty($object->linesmvt[0])) {
|
||||||
// in order to display it correctly to the user
|
$tmpline = $object->linesmvt[0];
|
||||||
$empty_line = array_shift($object->linesmvt);
|
if (!empty($tmpline->numero_compte)) {
|
||||||
$object->linesmvt[]= $empty_line;
|
$line = new BookKeepingLine();
|
||||||
|
$object->linesmvt[] = $line;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($object->linesmvt as $line) {
|
foreach ($object->linesmvt as $line) {
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|||||||
@ -597,9 +597,13 @@ class BookKeeping extends CommonObject
|
|||||||
if (empty($this->credit)) {
|
if (empty($this->credit)) {
|
||||||
$this->credit = 0;
|
$this->credit = 0;
|
||||||
}
|
}
|
||||||
|
if (empty($this->montant)) {
|
||||||
|
$this->montant = 0;
|
||||||
|
}
|
||||||
|
|
||||||
$this->debit = price2num($this->debit, 'MT');
|
$this->debit = price2num($this->debit, 'MT');
|
||||||
$this->credit = price2num($this->credit, 'MT');
|
$this->credit = price2num($this->credit, 'MT');
|
||||||
|
$this->montant = price2num($this->montant, 'MT');
|
||||||
|
|
||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
|
|
||||||
@ -1650,11 +1654,10 @@ class BookKeeping extends CommonObject
|
|||||||
$this->doc_date = $this->db->jdate($obj->doc_date);
|
$this->doc_date = $this->db->jdate($obj->doc_date);
|
||||||
$this->doc_ref = $obj->doc_ref;
|
$this->doc_ref = $obj->doc_ref;
|
||||||
$this->doc_type = $obj->doc_type;
|
$this->doc_type = $obj->doc_type;
|
||||||
$this->date_creation = $obj->date_creation;
|
$this->date_creation = $this->db->jdate($obj->date_creation);
|
||||||
$this->date_modification = $obj->date_modification;
|
$this->date_modification = $this->db->jdate($obj->date_modification);
|
||||||
$this->date_export = $obj->date_export;
|
$this->date_export = $this->db->jdate($obj->date_export);
|
||||||
$this->date_validation = $obj->date_validated;
|
$this->date_validation = $this->db->jdate($obj->date_validation);
|
||||||
$this->date_validation = $obj->date_validation;
|
|
||||||
} else {
|
} else {
|
||||||
$this->error = "Error ".$this->db->lasterror();
|
$this->error = "Error ".$this->db->lasterror();
|
||||||
dol_syslog(__METHOD__.$this->error, LOG_ERR);
|
dol_syslog(__METHOD__.$this->error, LOG_ERR);
|
||||||
|
|||||||
@ -99,7 +99,7 @@ $month = GETPOST("month", "int") ?GETPOST("month", "int") : date("m");
|
|||||||
$week = GETPOST("week", "int") ?GETPOST("week", "int") : date("W");
|
$week = GETPOST("week", "int") ?GETPOST("week", "int") : date("W");
|
||||||
$day = GETPOST("day", "int") ?GETPOST("day", "int") : date("d");
|
$day = GETPOST("day", "int") ?GETPOST("day", "int") : date("d");
|
||||||
$pid = GETPOST("search_projectid", "int", 3) ?GETPOST("search_projectid", "int", 3) : GETPOST("projectid", "int", 3);
|
$pid = GETPOST("search_projectid", "int", 3) ?GETPOST("search_projectid", "int", 3) : GETPOST("projectid", "int", 3);
|
||||||
$status = GETPOST("search_status", 'alpha') ?GETPOST("search_status", 'alpha') : GETPOST("status", 'alpha');
|
$status = GETPOSTISSET("search_status") ? GETPOST("search_status", 'aZ09') : GETPOST("status", 'aZ09'); // status may be 0, 50, 100, 'todo'
|
||||||
$type = GETPOST("search_type", 'alpha') ?GETPOST("search_type", 'alpha') : GETPOST("type", 'alpha');
|
$type = GETPOST("search_type", 'alpha') ?GETPOST("search_type", 'alpha') : GETPOST("type", 'alpha');
|
||||||
$maxprint = ((GETPOST("maxprint", 'int') != '') ?GETPOST("maxprint", 'int') : $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW);
|
$maxprint = ((GETPOST("maxprint", 'int') != '') ?GETPOST("maxprint", 'int') : $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW);
|
||||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||||
@ -153,9 +153,10 @@ if ($end_d < $begin_d) {
|
|||||||
$end_d = $begin_d + 1;
|
$end_d = $begin_d + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($status == '' && !GETPOSTISSET('status')) {
|
if ($status == '' && !GETPOSTISSET('search_status')) {
|
||||||
$status = (empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_STATUS);
|
$status = (empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_STATUS);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($mode) && !GETPOSTISSET('mode')) {
|
if (empty($mode) && !GETPOSTISSET('mode')) {
|
||||||
$mode = (empty($conf->global->AGENDA_DEFAULT_VIEW) ? 'show_month' : $conf->global->AGENDA_DEFAULT_VIEW);
|
$mode = (empty($conf->global->AGENDA_DEFAULT_VIEW) ? 'show_month' : $conf->global->AGENDA_DEFAULT_VIEW);
|
||||||
}
|
}
|
||||||
@ -512,7 +513,7 @@ print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
|||||||
if (empty($search_status)) {
|
if (empty($search_status)) {
|
||||||
$search_status = '';
|
$search_status = '';
|
||||||
}
|
}
|
||||||
print_actions_filter($form, $canedit, $search_status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, -1, $actioncode, $usergroup, '', $resourceid);
|
print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, -1, $actioncode, $usergroup, '', $resourceid);
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -612,6 +612,9 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
}
|
}
|
||||||
|
if (!empty($tplidx)) {
|
||||||
|
$pdf->useTemplate($tplidx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
||||||
if ($pagenb == 1) {
|
if ($pagenb == 1) {
|
||||||
|
|||||||
@ -836,6 +836,9 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
}
|
}
|
||||||
|
if (!empty($tplidx)) {
|
||||||
|
$pdf->useTemplate($tplidx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
||||||
if ($pagenb == $pageposafter) {
|
if ($pagenb == $pageposafter) {
|
||||||
|
|||||||
@ -433,6 +433,9 @@ class pdf_strato extends ModelePDFContract
|
|||||||
$pagenb++;
|
$pagenb++;
|
||||||
$pdf->setPage($pagenb);
|
$pdf->setPage($pagenb);
|
||||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||||
|
if (!empty($tplidx)) {
|
||||||
|
$pdf->useTemplate($tplidx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
||||||
|
|||||||
@ -575,6 +575,9 @@ class pdf_storm extends ModelePDFDeliveryOrder
|
|||||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
}
|
}
|
||||||
|
if (!empty($tplidx)) {
|
||||||
|
$pdf->useTemplate($tplidx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
||||||
if ($pagenb == 1) {
|
if ($pagenb == 1) {
|
||||||
|
|||||||
@ -499,6 +499,9 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
}
|
}
|
||||||
|
if (!empty($tplidx)) {
|
||||||
|
$pdf->useTemplate($tplidx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
||||||
if ($pagenb == 1) {
|
if ($pagenb == 1) {
|
||||||
|
|||||||
@ -708,6 +708,9 @@ class pdf_espadon extends ModelePdfExpedition
|
|||||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
}
|
}
|
||||||
|
if (!empty($tplidx)) {
|
||||||
|
$pdf->useTemplate($tplidx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
||||||
if ($pagenb == 1) {
|
if ($pagenb == 1) {
|
||||||
|
|||||||
@ -614,6 +614,9 @@ class pdf_rouget extends ModelePdfExpedition
|
|||||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
}
|
}
|
||||||
|
if (!empty($tplidx)) {
|
||||||
|
$pdf->useTemplate($tplidx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
||||||
if ($pagenb == 1) {
|
if ($pagenb == 1) {
|
||||||
|
|||||||
@ -478,6 +478,9 @@ class pdf_standard extends ModeleExpenseReport
|
|||||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
}
|
}
|
||||||
|
if (!empty($tplidx)) {
|
||||||
|
$pdf->useTemplate($tplidx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
||||||
if ($pagenb == 1) {
|
if ($pagenb == 1) {
|
||||||
|
|||||||
@ -796,6 +796,9 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
}
|
}
|
||||||
|
if (!empty($tplidx)) {
|
||||||
|
$pdf->useTemplate($tplidx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
||||||
if ($pagenb == 1) {
|
if ($pagenb == 1) {
|
||||||
|
|||||||
@ -930,6 +930,9 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs, $outputlangsbis);
|
$this->_pagehead($pdf, $object, 0, $outputlangs, $outputlangsbis);
|
||||||
}
|
}
|
||||||
|
if (!empty($tplidx)) {
|
||||||
|
$pdf->useTemplate($tplidx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
||||||
|
|||||||
@ -419,6 +419,9 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
}
|
}
|
||||||
|
if (!empty($tplidx)) {
|
||||||
|
$pdf->useTemplate($tplidx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
||||||
if ($pagenb == 1) {
|
if ($pagenb == 1) {
|
||||||
|
|||||||
@ -706,6 +706,9 @@ class pdf_standard extends ModelePDFMovement
|
|||||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
}
|
}
|
||||||
|
if (!empty($tplidx)) {
|
||||||
|
$pdf->useTemplate($tplidx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
||||||
if ($pagenb == 1) {
|
if ($pagenb == 1) {
|
||||||
|
|||||||
@ -471,6 +471,9 @@ class pdf_baleine extends ModelePDFProjects
|
|||||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
}
|
}
|
||||||
|
if (!empty($tplidx)) {
|
||||||
|
$pdf->useTemplate($tplidx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
||||||
if ($pagenb == 1) {
|
if ($pagenb == 1) {
|
||||||
|
|||||||
@ -736,6 +736,9 @@ class pdf_beluga extends ModelePDFProjects
|
|||||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
}
|
}
|
||||||
|
if (!empty($tplidx)) {
|
||||||
|
$pdf->useTemplate($tplidx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -474,6 +474,9 @@ class pdf_timespent extends ModelePDFProjects
|
|||||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
}
|
}
|
||||||
|
if (!empty($tplidx)) {
|
||||||
|
$pdf->useTemplate($tplidx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
||||||
if ($pagenb == 1) {
|
if ($pagenb == 1) {
|
||||||
|
|||||||
@ -727,6 +727,9 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
}
|
}
|
||||||
|
if (!empty($tplidx)) {
|
||||||
|
$pdf->useTemplate($tplidx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
||||||
if ($pagenb == 1) {
|
if ($pagenb == 1) {
|
||||||
|
|||||||
@ -851,6 +851,9 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
}
|
}
|
||||||
|
if (!empty($tplidx)) {
|
||||||
|
$pdf->useTemplate($tplidx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
||||||
|
|||||||
@ -538,6 +538,9 @@ class pdf_squille extends ModelePdfReception
|
|||||||
$pagenb++;
|
$pagenb++;
|
||||||
$pdf->setPage($pagenb);
|
$pdf->setPage($pagenb);
|
||||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||||
|
if (!empty($tplidx)) {
|
||||||
|
$pdf->useTemplate($tplidx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
||||||
if ($pagenb == 1) {
|
if ($pagenb == 1) {
|
||||||
|
|||||||
@ -484,6 +484,9 @@ class pdf_standard extends ModelePDFStock
|
|||||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
}
|
}
|
||||||
|
if (!empty($tplidx)) {
|
||||||
|
$pdf->useTemplate($tplidx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
||||||
if ($pagenb == 1) {
|
if ($pagenb == 1) {
|
||||||
|
|||||||
@ -778,6 +778,9 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
}
|
}
|
||||||
|
if (!empty($tplidx)) {
|
||||||
|
$pdf->useTemplate($tplidx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
||||||
if ($pagenb == $pageposafter) {
|
if ($pagenb == $pageposafter) {
|
||||||
|
|||||||
@ -660,6 +660,9 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
}
|
}
|
||||||
|
if (!empty($tplidx)) {
|
||||||
|
$pdf->useTemplate($tplidx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
||||||
if ($pagenb == 1) {
|
if ($pagenb == 1) {
|
||||||
|
|||||||
@ -447,6 +447,9 @@ class pdf_standard extends ModelePDFSuppliersPayments
|
|||||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
}
|
}
|
||||||
|
if (!empty($tplidx)) {
|
||||||
|
$pdf->useTemplate($tplidx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
||||||
if ($pagenb == 1) {
|
if ($pagenb == 1) {
|
||||||
|
|||||||
@ -660,6 +660,9 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
}
|
}
|
||||||
|
if (!empty($tplidx)) {
|
||||||
|
$pdf->useTemplate($tplidx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
||||||
if ($pagenb == 1) {
|
if ($pagenb == 1) {
|
||||||
|
|||||||
@ -751,6 +751,9 @@ class pdf_standard_myobject extends ModelePDFMyObject
|
|||||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
}
|
}
|
||||||
|
if (!empty($tplidx)) {
|
||||||
|
$pdf->useTemplate($tplidx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
||||||
|
|||||||
@ -135,7 +135,7 @@ class Productcustomerprice extends CommonObject
|
|||||||
$this->price_base_type = trim($this->price_base_type);
|
$this->price_base_type = trim($this->price_base_type);
|
||||||
}
|
}
|
||||||
if (isset($this->tva_tx)) {
|
if (isset($this->tva_tx)) {
|
||||||
$this->tva_tx = trim($this->tva_tx);
|
$this->tva_tx = (float) $this->tva_tx;
|
||||||
}
|
}
|
||||||
if (isset($this->recuperableonly)) {
|
if (isset($this->recuperableonly)) {
|
||||||
$this->recuperableonly = trim($this->recuperableonly);
|
$this->recuperableonly = trim($this->recuperableonly);
|
||||||
@ -621,7 +621,7 @@ class Productcustomerprice extends CommonObject
|
|||||||
$this->price_base_type = trim($this->price_base_type);
|
$this->price_base_type = trim($this->price_base_type);
|
||||||
}
|
}
|
||||||
if (isset($this->tva_tx)) {
|
if (isset($this->tva_tx)) {
|
||||||
$this->tva_tx = trim($this->tva_tx);
|
$this->tva_tx = (float) $this->tva_tx;
|
||||||
}
|
}
|
||||||
if (isset($this->recuperableonly)) {
|
if (isset($this->recuperableonly)) {
|
||||||
$this->recuperableonly = trim($this->recuperableonly);
|
$this->recuperableonly = trim($this->recuperableonly);
|
||||||
|
|||||||
@ -620,6 +620,22 @@ if ($search_array_options) {
|
|||||||
foreach ($search_array_options as $key => $val) {
|
foreach ($search_array_options as $key => $val) {
|
||||||
$crit = $val;
|
$crit = $val;
|
||||||
$tmpkey = preg_replace('/search_options_/', '', $key);
|
$tmpkey = preg_replace('/search_options_/', '', $key);
|
||||||
|
if (is_array($val) && array_key_exists('start', $val) && array_key_exists('end', $val)) {
|
||||||
|
// date range from list filters is stored as array('start' => <timestamp>, 'end' => <timestamp>)
|
||||||
|
// start date
|
||||||
|
$param .= '&search_options_'.$tmpkey.'_startyear='.dol_print_date($val['start'], '%Y');
|
||||||
|
$param .= '&search_options_'.$tmpkey.'_startmonth='.dol_print_date($val['start'], '%m');
|
||||||
|
$param .= '&search_options_'.$tmpkey.'_startday='.dol_print_date($val['start'], '%d');
|
||||||
|
$param .= '&search_options_'.$tmpkey.'_starthour='.dol_print_date($val['start'], '%H');
|
||||||
|
$param .= '&search_options_'.$tmpkey.'_startmin='.dol_print_date($val['start'], '%M');
|
||||||
|
// end date
|
||||||
|
$param .= '&search_options_'.$tmpkey.'_endyear='.dol_print_date($val['end'], '%Y');
|
||||||
|
$param .= '&search_options_'.$tmpkey.'_endmonth='.dol_print_date($val['end'], '%m');
|
||||||
|
$param .= '&search_options_'.$tmpkey.'_endday='.dol_print_date($val['end'], '%d');
|
||||||
|
$param .= '&search_options_'.$tmpkey.'_endhour='.dol_print_date($val['end'], '%H');
|
||||||
|
$param .= '&search_options_'.$tmpkey.'_endmin='.dol_print_date($val['end'], '%M');
|
||||||
|
$val = '';
|
||||||
|
}
|
||||||
if ($val != '') {
|
if ($val != '') {
|
||||||
$param .= '&search_options_'.$tmpkey.'='.urlencode($val);
|
$param .= '&search_options_'.$tmpkey.'='.urlencode($val);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -678,6 +678,9 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio
|
|||||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
}
|
}
|
||||||
|
if (!empty($tplidx)) {
|
||||||
|
$pdf->useTemplate($tplidx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
||||||
|
|||||||
@ -915,8 +915,8 @@ class Societe extends CommonObject
|
|||||||
$sql .= ", accountancy_code_sell";
|
$sql .= ", accountancy_code_sell";
|
||||||
}
|
}
|
||||||
$sql .= ") VALUES ('".$this->db->escape($this->name)."', '".$this->db->escape($this->name_alias)."', ".((int) $this->entity).", '".$this->db->idate($now)."'";
|
$sql .= ") VALUES ('".$this->db->escape($this->name)."', '".$this->db->escape($this->name_alias)."', ".((int) $this->entity).", '".$this->db->idate($now)."'";
|
||||||
$sql .= ", ".(!empty($this->typent_id) ? ((int) $this->typent_id) : "null");
|
|
||||||
$sql .= ", ".(!empty($user->id) ? ((int) $user->id) : "null");
|
$sql .= ", ".(!empty($user->id) ? ((int) $user->id) : "null");
|
||||||
|
$sql .= ", ".(!empty($this->typent_id) ? ((int) $this->typent_id) : "null");
|
||||||
$sql .= ", ".(!empty($this->canvas) ? "'".$this->db->escape($this->canvas)."'" : "null");
|
$sql .= ", ".(!empty($this->canvas) ? "'".$this->db->escape($this->canvas)."'" : "null");
|
||||||
$sql .= ", ".((int) $this->status);
|
$sql .= ", ".((int) $this->status);
|
||||||
$sql .= ", ".(!empty($this->ref_ext) ? "'".$this->db->escape($this->ref_ext)."'" : "null");
|
$sql .= ", ".(!empty($this->ref_ext) ? "'".$this->db->escape($this->ref_ext)."'" : "null");
|
||||||
@ -1078,7 +1078,7 @@ class Societe extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($error)) {
|
if (empty($error)) {
|
||||||
dol_syslog(get_class($this)."::create_individual success");
|
dol_syslog(get_class($this)."::create_individual success");
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user