2
0
forked from Wavyzz/dolibarr

Merge github.com:Dolibarr/dolibarr into dev_add_dict_NatureOfProductType

This commit is contained in:
Florian HENRY
2020-10-15 08:25:46 +02:00
13 changed files with 73 additions and 60 deletions

View File

@@ -2052,7 +2052,6 @@ function dol_print_date($time, $format = '', $tzoutput = 'tzserver', $outputlang
* @param boolean $fast Fast mode. deprecated.
* @param string $forcetimezone '' to use the PHP server timezone. Or use a form like 'Europe/Paris' or '+0200' to force timezone.
* @return array Array of informations
* If no fast mode:
* 'seconds' => $secs,
* 'minutes' => $min,
* 'hours' => $hour,
@@ -2061,6 +2060,7 @@ function dol_print_date($time, $format = '', $tzoutput = 'tzserver', $outputlang
* 'mon' => $month,
* 'year' => $year,
* 'yday' => floor($secsInYear/$_day_power)
* '0' => original timestamp
* @see dol_print_date(), dol_stringtotime(), dol_mktime()
*/
function dol_getdate($timestamp, $fast = false, $forcetimezone = '')
@@ -2080,7 +2080,8 @@ function dol_getdate($timestamp, $fast = false, $forcetimezone = '')
'yday'=>((int) date_format($datetimeobj, 'z')),
'hours'=>((int) date_format($datetimeobj, 'H')),
'minutes'=>((int) date_format($datetimeobj, 'i')),
'seconds'=>((int) date_format($datetimeobj, 's'))
'seconds'=>((int) date_format($datetimeobj, 's')),
'0'=>$timestamp
);
} else {
// PHP getdate is restricted to the years 1901-2038 on Unix and 1970-2038 on Windows

View File

@@ -230,7 +230,7 @@ class pdf_einstein extends ModelePDFCommandes
$outputlangsbis->setDefaultLang($conf->global->PDF_USE_ALSO_LANGUAGE_CODE);
$outputlangsbis->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries"));
}
$nblines = count($object->lines);
if ($conf->commande->multidir_output[$conf->entity])
@@ -794,7 +794,7 @@ class pdf_einstein extends ModelePDFCommandes
if (!empty($conf->global->FACTURE_CHQ_NUMBER))
{
$diffsizetitle = (empty($conf->global->PDF_DIFFSIZE_TITLE) ? 3 : $conf->global->PDF_DIFFSIZE_TITLE);
if ($conf->global->FACTURE_CHQ_NUMBER > 0)
{
$account = new Account($this->db);
@@ -879,7 +879,7 @@ class pdf_einstein extends ModelePDFCommandes
$outputlangsbis->loadLangs(array("main", "dict", "companies", "bills", "products", "propal"));
$default_font_size--;
}
$tab2_top = $posy;
$tab2_hl = 4;
$pdf->SetFont('', '', $default_font_size - 1);
@@ -1031,7 +1031,7 @@ class pdf_einstein extends ModelePDFCommandes
}
$totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transcountrynoentities("TotalLT1", $mysoc->country_code) : '');
$totalvat .= ' ';
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
@@ -1065,7 +1065,7 @@ class pdf_einstein extends ModelePDFCommandes
}
$totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transcountrynoentities("TotalLT2", $mysoc->country_code) : '');
$totalvat .= ' ';
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
@@ -1161,7 +1161,7 @@ class pdf_einstein extends ModelePDFCommandes
if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && is_object($outputlangsbis)) {
$titre .= ' - '.$outputlangsbis->transnoentities("AmountInCurrency", $outputlangsbis->transnoentitiesnoconv("Currency".$currency));
}
$pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), $tab_top - 4);
$pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre);
@@ -1271,7 +1271,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->SetFont('', 'B', $default_font_size + 3);
$w = 100;
$posy = $this->marge_haute;
$posx = $this->page_largeur - $this->marge_droite - $w;

View File

@@ -124,8 +124,8 @@ class pdf_eratosthene extends ModelePDFCommandes
* @var array of document table collumns
*/
public $cols;
/**
* Constructor
*
@@ -176,7 +176,7 @@ class pdf_eratosthene extends ModelePDFCommandes
$this->tabTitleHeight = 5; // default height
// Use new system for position of columns, view $this->defineColumnField()
$this->tva = array();
$this->localtax1 = array();
$this->localtax2 = array();
@@ -364,7 +364,7 @@ class pdf_eratosthene extends ModelePDFCommandes
$this->atleastonediscount++;
}
}
// New page
$pdf->AddPage();
@@ -425,7 +425,7 @@ class pdf_eratosthene extends ModelePDFCommandes
if ($notetoshow)
{
$tab_top -= 2;
$tab_width = $this->page_largeur - $this->marge_gauche - $this->marge_droite;
$pageposbeforenote = $pagenb;
@@ -709,7 +709,7 @@ class pdf_eratosthene extends ModelePDFCommandes
$this->printStdColumnContent($pdf, $curY, 'totalincltax', $total_incl_tax);
$nexY = max($pdf->GetY(), $nexY);
}
// Extrafields
if (!empty($object->lines[$i]->array_options)) {
foreach ($object->lines[$i]->array_options as $extrafieldColKey => $extrafieldValue) {
@@ -1011,7 +1011,7 @@ class pdf_eratosthene extends ModelePDFCommandes
if (!empty($conf->global->FACTURE_CHQ_NUMBER))
{
$diffsizetitle = (empty($conf->global->PDF_DIFFSIZE_TITLE) ? 3 : $conf->global->PDF_DIFFSIZE_TITLE);
if ($conf->global->FACTURE_CHQ_NUMBER > 0)
{
$account = new Account($this->db);
@@ -1094,7 +1094,7 @@ class pdf_eratosthene extends ModelePDFCommandes
$outputlangsbis->loadLangs(array("main", "dict", "companies", "bills", "products", "propal"));
$default_font_size--;
}
$tab2_top = $posy;
$tab2_hl = 4;
$pdf->SetFont('', '', $default_font_size - 1);
@@ -1374,7 +1374,7 @@ class pdf_eratosthene extends ModelePDFCommandes
if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && is_object($outputlangsbis)) {
$titre .= ' - '.$outputlangsbis->transnoentities("AmountInCurrency", $outputlangsbis->transnoentitiesnoconv("Currency".$currency));
}
$pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), $tab_top - 4);
$pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre);
@@ -1433,7 +1433,7 @@ class pdf_eratosthene extends ModelePDFCommandes
$pdf->SetFont('', 'B', $default_font_size + 3);
$w = 100;
$posy = $this->marge_haute;
$posx = $this->page_largeur - $this->marge_droite - $w;
@@ -1844,7 +1844,7 @@ class pdf_eratosthene extends ModelePDFCommandes
),
'border-left' => true, // add left line separator
);
// Add extrafields cols
if (!empty($object->lines)) {
$line = reset($object->lines);

View File

@@ -394,7 +394,7 @@ class pdf_sponge extends ModelePDFFactures
$this->atleastonediscount++;
}
}
// Situation invoice handling
if ($object->situation_cycle_ref)
@@ -750,7 +750,7 @@ class pdf_sponge extends ModelePDFFactures
$this->printStdColumnContent($pdf, $curY, 'totalincltax', $total_incl_tax);
$nexY = max($pdf->GetY(), $nexY);
}
// Extrafields
if (!empty($object->lines[$i]->array_options)) {
foreach ($object->lines[$i]->array_options as $extrafieldColKey => $extrafieldValue) {
@@ -2349,7 +2349,7 @@ class pdf_sponge extends ModelePDFFactures
),
'border-left' => true, // add left line separator
);
// Add extrafields cols
if (!empty($object->lines)) {
$line = reset($object->lines);

View File

@@ -123,8 +123,8 @@ class pdf_cyan extends ModelePDFPropales
* @var array of document table collumns
*/
public $cols;
/**
* Constructor
*
@@ -170,12 +170,12 @@ class pdf_cyan extends ModelePDFPropales
// Define position of columns
$this->posxdesc = $this->marge_gauche + 1; // used for notes ans other stuff
$this->tabTitleHeight = 5; // default height
// Use new system for position of columns, view $this->defineColumnField()
$this->tva = array();
$this->localtax1 = array();
$this->localtax2 = array();
@@ -359,7 +359,7 @@ class pdf_cyan extends ModelePDFPropales
$this->atleastonediscount++;
}
}
// New page
$pdf->AddPage();
@@ -1178,7 +1178,7 @@ class pdf_cyan extends ModelePDFPropales
$outputlangsbis->loadLangs(array("main", "dict", "companies", "bills", "products", "propal"));
$default_font_size--;
}
$tab2_top = $posy;
$tab2_hl = 4;
$pdf->SetFont('', '', $default_font_size - 1);
@@ -1534,7 +1534,7 @@ class pdf_cyan extends ModelePDFPropales
$pdf->SetFont('', 'B', $default_font_size + 3);
$w = 100;
$posy = $this->marge_haute;
$posx = $this->page_largeur - $this->marge_droite - $w;