Merge github.com:Dolibarr/dolibarr into dev_add_dict_NatureOfProductType
This commit is contained in:
commit
109d1ab801
@ -79,7 +79,7 @@ class PropaleStats extends Stats
|
|||||||
$this->field = 'total_ht';
|
$this->field = 'total_ht';
|
||||||
$this->field_line = 'total_ht';
|
$this->field_line = 'total_ht';
|
||||||
|
|
||||||
$this->where .= " p.fk_statut > 0";
|
//$this->where .= " p.fk_statut > 0";
|
||||||
}
|
}
|
||||||
if ($mode == 'supplier')
|
if ($mode == 'supplier')
|
||||||
{
|
{
|
||||||
@ -91,10 +91,10 @@ class PropaleStats extends Stats
|
|||||||
$this->field = 'total_ht';
|
$this->field = 'total_ht';
|
||||||
$this->field_line = 'total_ht';
|
$this->field_line = 'total_ht';
|
||||||
|
|
||||||
$this->where .= " p.fk_statut > 0"; // Validated, accepted, refused and closed
|
//$this->where .= " p.fk_statut > 0"; // Validated, accepted, refused and closed
|
||||||
}
|
}
|
||||||
//$this->where.= " AND p.fk_soc = s.rowid AND p.entity = ".$conf->entity;
|
//$this->where.= " AND p.fk_soc = s.rowid AND p.entity = ".$conf->entity;
|
||||||
$this->where .= " AND p.entity IN (".getEntity('propal').")";
|
$this->where .= ($this->where ? ' AND ' : '')."p.entity IN (".getEntity('propal').")";
|
||||||
if (!$user->rights->societe->client->voir && !$this->socid) $this->where .= " AND p.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id;
|
if (!$user->rights->societe->client->voir && !$this->socid) $this->where .= " AND p.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id;
|
||||||
if ($this->socid)
|
if ($this->socid)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -86,7 +86,7 @@ if ($mode == 'customer')
|
|||||||
if ($mode == 'supplier')
|
if ($mode == 'supplier')
|
||||||
{
|
{
|
||||||
$picto = 'supplier_proposal';
|
$picto = 'supplier_proposal';
|
||||||
$title = $langs->trans("ProposalsStatisticsSuppliers").' ('.$langs->trans("SentToSuppliers").")";
|
$title = $langs->trans("ProposalsStatisticsSuppliers");
|
||||||
$dir = $conf->supplier_proposal->dir_temp;
|
$dir = $conf->supplier_proposal->dir_temp;
|
||||||
$cat_type = Categorie::TYPE_SUPPLIER;
|
$cat_type = Categorie::TYPE_SUPPLIER;
|
||||||
$cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Supplier"));
|
$cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Supplier"));
|
||||||
|
|||||||
@ -77,7 +77,7 @@ class CommandeStats extends Stats
|
|||||||
$this->from_line = MAIN_DB_PREFIX.$object->table_element_line." as tl";
|
$this->from_line = MAIN_DB_PREFIX.$object->table_element_line." as tl";
|
||||||
$this->field = 'total_ht';
|
$this->field = 'total_ht';
|
||||||
$this->field_line = 'total_ht';
|
$this->field_line = 'total_ht';
|
||||||
$this->where .= " c.fk_statut > 0"; // Not draft and not cancelled
|
//$this->where .= " c.fk_statut > 0"; // Not draft and not cancelled
|
||||||
} elseif ($mode == 'supplier')
|
} elseif ($mode == 'supplier')
|
||||||
{
|
{
|
||||||
$object = new CommandeFournisseur($this->db);
|
$object = new CommandeFournisseur($this->db);
|
||||||
@ -85,10 +85,10 @@ class CommandeStats extends Stats
|
|||||||
$this->from_line = MAIN_DB_PREFIX.$object->table_element_line." as tl";
|
$this->from_line = MAIN_DB_PREFIX.$object->table_element_line." as tl";
|
||||||
$this->field = 'total_ht';
|
$this->field = 'total_ht';
|
||||||
$this->field_line = 'total_ht';
|
$this->field_line = 'total_ht';
|
||||||
$this->where .= " c.fk_statut > 2"; // Only approved & ordered
|
//$this->where .= " c.fk_statut > 2"; // Only approved & ordered
|
||||||
}
|
}
|
||||||
//$this->where.= " AND c.fk_soc = s.rowid AND c.entity = ".$conf->entity;
|
//$this->where.= " AND c.fk_soc = s.rowid AND c.entity = ".$conf->entity;
|
||||||
$this->where .= ' AND c.entity IN ('.getEntity('commande').')';
|
$this->where .= ($this->where ? ' AND ' : ''). 'c.entity IN ('.getEntity('commande').')';
|
||||||
|
|
||||||
if (!$user->rights->societe->client->voir && !$this->socid) $this->where .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id;
|
if (!$user->rights->societe->client->voir && !$this->socid) $this->where .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id;
|
||||||
if ($this->socid)
|
if ($this->socid)
|
||||||
|
|||||||
@ -81,7 +81,7 @@ $dir = $conf->commande->dir_temp;
|
|||||||
if ($mode == 'supplier')
|
if ($mode == 'supplier')
|
||||||
{
|
{
|
||||||
$picto = 'supplier_order';
|
$picto = 'supplier_order';
|
||||||
$title = $langs->trans("OrdersStatisticsSuppliers").' ('.$langs->trans("SentToSuppliers").")";
|
$title = $langs->trans("OrdersStatisticsSuppliers");
|
||||||
$dir = $conf->fournisseur->commande->dir_temp;
|
$dir = $conf->fournisseur->commande->dir_temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2052,7 +2052,6 @@ function dol_print_date($time, $format = '', $tzoutput = 'tzserver', $outputlang
|
|||||||
* @param boolean $fast Fast mode. deprecated.
|
* @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.
|
* @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
|
* @return array Array of informations
|
||||||
* If no fast mode:
|
|
||||||
* 'seconds' => $secs,
|
* 'seconds' => $secs,
|
||||||
* 'minutes' => $min,
|
* 'minutes' => $min,
|
||||||
* 'hours' => $hour,
|
* 'hours' => $hour,
|
||||||
@ -2061,6 +2060,7 @@ function dol_print_date($time, $format = '', $tzoutput = 'tzserver', $outputlang
|
|||||||
* 'mon' => $month,
|
* 'mon' => $month,
|
||||||
* 'year' => $year,
|
* 'year' => $year,
|
||||||
* 'yday' => floor($secsInYear/$_day_power)
|
* 'yday' => floor($secsInYear/$_day_power)
|
||||||
|
* '0' => original timestamp
|
||||||
* @see dol_print_date(), dol_stringtotime(), dol_mktime()
|
* @see dol_print_date(), dol_stringtotime(), dol_mktime()
|
||||||
*/
|
*/
|
||||||
function dol_getdate($timestamp, $fast = false, $forcetimezone = '')
|
function dol_getdate($timestamp, $fast = false, $forcetimezone = '')
|
||||||
@ -2080,7 +2080,8 @@ function dol_getdate($timestamp, $fast = false, $forcetimezone = '')
|
|||||||
'yday'=>((int) date_format($datetimeobj, 'z')),
|
'yday'=>((int) date_format($datetimeobj, 'z')),
|
||||||
'hours'=>((int) date_format($datetimeobj, 'H')),
|
'hours'=>((int) date_format($datetimeobj, 'H')),
|
||||||
'minutes'=>((int) date_format($datetimeobj, 'i')),
|
'minutes'=>((int) date_format($datetimeobj, 'i')),
|
||||||
'seconds'=>((int) date_format($datetimeobj, 's'))
|
'seconds'=>((int) date_format($datetimeobj, 's')),
|
||||||
|
'0'=>$timestamp
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
// PHP getdate is restricted to the years 1901-2038 on Unix and 1970-2038 on Windows
|
// PHP getdate is restricted to the years 1901-2038 on Unix and 1970-2038 on Windows
|
||||||
|
|||||||
@ -230,7 +230,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
$outputlangsbis->setDefaultLang($conf->global->PDF_USE_ALSO_LANGUAGE_CODE);
|
$outputlangsbis->setDefaultLang($conf->global->PDF_USE_ALSO_LANGUAGE_CODE);
|
||||||
$outputlangsbis->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries"));
|
$outputlangsbis->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries"));
|
||||||
}
|
}
|
||||||
|
|
||||||
$nblines = count($object->lines);
|
$nblines = count($object->lines);
|
||||||
|
|
||||||
if ($conf->commande->multidir_output[$conf->entity])
|
if ($conf->commande->multidir_output[$conf->entity])
|
||||||
@ -794,7 +794,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
if (!empty($conf->global->FACTURE_CHQ_NUMBER))
|
if (!empty($conf->global->FACTURE_CHQ_NUMBER))
|
||||||
{
|
{
|
||||||
$diffsizetitle = (empty($conf->global->PDF_DIFFSIZE_TITLE) ? 3 : $conf->global->PDF_DIFFSIZE_TITLE);
|
$diffsizetitle = (empty($conf->global->PDF_DIFFSIZE_TITLE) ? 3 : $conf->global->PDF_DIFFSIZE_TITLE);
|
||||||
|
|
||||||
if ($conf->global->FACTURE_CHQ_NUMBER > 0)
|
if ($conf->global->FACTURE_CHQ_NUMBER > 0)
|
||||||
{
|
{
|
||||||
$account = new Account($this->db);
|
$account = new Account($this->db);
|
||||||
@ -879,7 +879,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
$outputlangsbis->loadLangs(array("main", "dict", "companies", "bills", "products", "propal"));
|
$outputlangsbis->loadLangs(array("main", "dict", "companies", "bills", "products", "propal"));
|
||||||
$default_font_size--;
|
$default_font_size--;
|
||||||
}
|
}
|
||||||
|
|
||||||
$tab2_top = $posy;
|
$tab2_top = $posy;
|
||||||
$tab2_hl = 4;
|
$tab2_hl = 4;
|
||||||
$pdf->SetFont('', '', $default_font_size - 1);
|
$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 = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transcountrynoentities("TotalLT1", $mysoc->country_code) : '');
|
||||||
$totalvat .= ' ';
|
$totalvat .= ' ';
|
||||||
|
|
||||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
$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 = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transcountrynoentities("TotalLT2", $mysoc->country_code) : '');
|
||||||
$totalvat .= ' ';
|
$totalvat .= ' ';
|
||||||
|
|
||||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
$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)) {
|
if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && is_object($outputlangsbis)) {
|
||||||
$titre .= ' - '.$outputlangsbis->transnoentities("AmountInCurrency", $outputlangsbis->transnoentitiesnoconv("Currency".$currency));
|
$titre .= ' - '.$outputlangsbis->transnoentities("AmountInCurrency", $outputlangsbis->transnoentitiesnoconv("Currency".$currency));
|
||||||
}
|
}
|
||||||
|
|
||||||
$pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), $tab_top - 4);
|
$pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), $tab_top - 4);
|
||||||
$pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre);
|
$pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre);
|
||||||
|
|
||||||
@ -1271,7 +1271,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
$pdf->SetFont('', 'B', $default_font_size + 3);
|
$pdf->SetFont('', 'B', $default_font_size + 3);
|
||||||
|
|
||||||
$w = 100;
|
$w = 100;
|
||||||
|
|
||||||
$posy = $this->marge_haute;
|
$posy = $this->marge_haute;
|
||||||
$posx = $this->page_largeur - $this->marge_droite - $w;
|
$posx = $this->page_largeur - $this->marge_droite - $w;
|
||||||
|
|
||||||
|
|||||||
@ -124,8 +124,8 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
* @var array of document table collumns
|
* @var array of document table collumns
|
||||||
*/
|
*/
|
||||||
public $cols;
|
public $cols;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
@ -176,7 +176,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
$this->tabTitleHeight = 5; // default height
|
$this->tabTitleHeight = 5; // default height
|
||||||
|
|
||||||
// Use new system for position of columns, view $this->defineColumnField()
|
// Use new system for position of columns, view $this->defineColumnField()
|
||||||
|
|
||||||
$this->tva = array();
|
$this->tva = array();
|
||||||
$this->localtax1 = array();
|
$this->localtax1 = array();
|
||||||
$this->localtax2 = array();
|
$this->localtax2 = array();
|
||||||
@ -364,7 +364,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
$this->atleastonediscount++;
|
$this->atleastonediscount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// New page
|
// New page
|
||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
@ -425,7 +425,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
if ($notetoshow)
|
if ($notetoshow)
|
||||||
{
|
{
|
||||||
$tab_top -= 2;
|
$tab_top -= 2;
|
||||||
|
|
||||||
$tab_width = $this->page_largeur - $this->marge_gauche - $this->marge_droite;
|
$tab_width = $this->page_largeur - $this->marge_gauche - $this->marge_droite;
|
||||||
$pageposbeforenote = $pagenb;
|
$pageposbeforenote = $pagenb;
|
||||||
|
|
||||||
@ -709,7 +709,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
$this->printStdColumnContent($pdf, $curY, 'totalincltax', $total_incl_tax);
|
$this->printStdColumnContent($pdf, $curY, 'totalincltax', $total_incl_tax);
|
||||||
$nexY = max($pdf->GetY(), $nexY);
|
$nexY = max($pdf->GetY(), $nexY);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extrafields
|
// Extrafields
|
||||||
if (!empty($object->lines[$i]->array_options)) {
|
if (!empty($object->lines[$i]->array_options)) {
|
||||||
foreach ($object->lines[$i]->array_options as $extrafieldColKey => $extrafieldValue) {
|
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))
|
if (!empty($conf->global->FACTURE_CHQ_NUMBER))
|
||||||
{
|
{
|
||||||
$diffsizetitle = (empty($conf->global->PDF_DIFFSIZE_TITLE) ? 3 : $conf->global->PDF_DIFFSIZE_TITLE);
|
$diffsizetitle = (empty($conf->global->PDF_DIFFSIZE_TITLE) ? 3 : $conf->global->PDF_DIFFSIZE_TITLE);
|
||||||
|
|
||||||
if ($conf->global->FACTURE_CHQ_NUMBER > 0)
|
if ($conf->global->FACTURE_CHQ_NUMBER > 0)
|
||||||
{
|
{
|
||||||
$account = new Account($this->db);
|
$account = new Account($this->db);
|
||||||
@ -1094,7 +1094,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
$outputlangsbis->loadLangs(array("main", "dict", "companies", "bills", "products", "propal"));
|
$outputlangsbis->loadLangs(array("main", "dict", "companies", "bills", "products", "propal"));
|
||||||
$default_font_size--;
|
$default_font_size--;
|
||||||
}
|
}
|
||||||
|
|
||||||
$tab2_top = $posy;
|
$tab2_top = $posy;
|
||||||
$tab2_hl = 4;
|
$tab2_hl = 4;
|
||||||
$pdf->SetFont('', '', $default_font_size - 1);
|
$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)) {
|
if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && is_object($outputlangsbis)) {
|
||||||
$titre .= ' - '.$outputlangsbis->transnoentities("AmountInCurrency", $outputlangsbis->transnoentitiesnoconv("Currency".$currency));
|
$titre .= ' - '.$outputlangsbis->transnoentities("AmountInCurrency", $outputlangsbis->transnoentitiesnoconv("Currency".$currency));
|
||||||
}
|
}
|
||||||
|
|
||||||
$pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), $tab_top - 4);
|
$pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), $tab_top - 4);
|
||||||
$pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre);
|
$pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre);
|
||||||
|
|
||||||
@ -1433,7 +1433,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
$pdf->SetFont('', 'B', $default_font_size + 3);
|
$pdf->SetFont('', 'B', $default_font_size + 3);
|
||||||
|
|
||||||
$w = 100;
|
$w = 100;
|
||||||
|
|
||||||
$posy = $this->marge_haute;
|
$posy = $this->marge_haute;
|
||||||
$posx = $this->page_largeur - $this->marge_droite - $w;
|
$posx = $this->page_largeur - $this->marge_droite - $w;
|
||||||
|
|
||||||
@ -1844,7 +1844,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
),
|
),
|
||||||
'border-left' => true, // add left line separator
|
'border-left' => true, // add left line separator
|
||||||
);
|
);
|
||||||
|
|
||||||
// Add extrafields cols
|
// Add extrafields cols
|
||||||
if (!empty($object->lines)) {
|
if (!empty($object->lines)) {
|
||||||
$line = reset($object->lines);
|
$line = reset($object->lines);
|
||||||
|
|||||||
@ -394,7 +394,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
$this->atleastonediscount++;
|
$this->atleastonediscount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Situation invoice handling
|
// Situation invoice handling
|
||||||
if ($object->situation_cycle_ref)
|
if ($object->situation_cycle_ref)
|
||||||
@ -750,7 +750,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
$this->printStdColumnContent($pdf, $curY, 'totalincltax', $total_incl_tax);
|
$this->printStdColumnContent($pdf, $curY, 'totalincltax', $total_incl_tax);
|
||||||
$nexY = max($pdf->GetY(), $nexY);
|
$nexY = max($pdf->GetY(), $nexY);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extrafields
|
// Extrafields
|
||||||
if (!empty($object->lines[$i]->array_options)) {
|
if (!empty($object->lines[$i]->array_options)) {
|
||||||
foreach ($object->lines[$i]->array_options as $extrafieldColKey => $extrafieldValue) {
|
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
|
'border-left' => true, // add left line separator
|
||||||
);
|
);
|
||||||
|
|
||||||
// Add extrafields cols
|
// Add extrafields cols
|
||||||
if (!empty($object->lines)) {
|
if (!empty($object->lines)) {
|
||||||
$line = reset($object->lines);
|
$line = reset($object->lines);
|
||||||
|
|||||||
@ -123,8 +123,8 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
* @var array of document table collumns
|
* @var array of document table collumns
|
||||||
*/
|
*/
|
||||||
public $cols;
|
public $cols;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
@ -170,12 +170,12 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
|
|
||||||
// Define position of columns
|
// Define position of columns
|
||||||
$this->posxdesc = $this->marge_gauche + 1; // used for notes ans other stuff
|
$this->posxdesc = $this->marge_gauche + 1; // used for notes ans other stuff
|
||||||
|
|
||||||
|
|
||||||
$this->tabTitleHeight = 5; // default height
|
$this->tabTitleHeight = 5; // default height
|
||||||
|
|
||||||
// Use new system for position of columns, view $this->defineColumnField()
|
// Use new system for position of columns, view $this->defineColumnField()
|
||||||
|
|
||||||
$this->tva = array();
|
$this->tva = array();
|
||||||
$this->localtax1 = array();
|
$this->localtax1 = array();
|
||||||
$this->localtax2 = array();
|
$this->localtax2 = array();
|
||||||
@ -359,7 +359,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
$this->atleastonediscount++;
|
$this->atleastonediscount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// New page
|
// New page
|
||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
@ -1178,7 +1178,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
$outputlangsbis->loadLangs(array("main", "dict", "companies", "bills", "products", "propal"));
|
$outputlangsbis->loadLangs(array("main", "dict", "companies", "bills", "products", "propal"));
|
||||||
$default_font_size--;
|
$default_font_size--;
|
||||||
}
|
}
|
||||||
|
|
||||||
$tab2_top = $posy;
|
$tab2_top = $posy;
|
||||||
$tab2_hl = 4;
|
$tab2_hl = 4;
|
||||||
$pdf->SetFont('', '', $default_font_size - 1);
|
$pdf->SetFont('', '', $default_font_size - 1);
|
||||||
@ -1534,7 +1534,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
$pdf->SetFont('', 'B', $default_font_size + 3);
|
$pdf->SetFont('', 'B', $default_font_size + 3);
|
||||||
|
|
||||||
$w = 100;
|
$w = 100;
|
||||||
|
|
||||||
$posy = $this->marge_haute;
|
$posy = $this->marge_haute;
|
||||||
$posx = $this->page_largeur - $this->marge_droite - $w;
|
$posx = $this->page_largeur - $this->marge_droite - $w;
|
||||||
|
|
||||||
|
|||||||
@ -64,7 +64,6 @@ class FichinterStats extends Stats
|
|||||||
$this->userid = $userid;
|
$this->userid = $userid;
|
||||||
$this->cachefilesuffix = $mode;
|
$this->cachefilesuffix = $mode;
|
||||||
|
|
||||||
$this->where .= " c.entity = ".$conf->entity;
|
|
||||||
if ($mode == 'customer')
|
if ($mode == 'customer')
|
||||||
{
|
{
|
||||||
$object = new Fichinter($this->db);
|
$object = new Fichinter($this->db);
|
||||||
@ -75,6 +74,8 @@ class FichinterStats extends Stats
|
|||||||
//$this->where.= " AND c.fk_statut > 0"; // Not draft and not cancelled
|
//$this->where.= " AND c.fk_statut > 0"; // Not draft and not cancelled
|
||||||
}
|
}
|
||||||
if (!$user->rights->societe->client->voir && !$this->socid) $this->where .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id;
|
if (!$user->rights->societe->client->voir && !$this->socid) $this->where .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id;
|
||||||
|
$this->where .= ($this->where ? ' AND ' : '')."c.entity IN (".getEntity('fichinter').')';
|
||||||
|
|
||||||
if ($this->socid)
|
if ($this->socid)
|
||||||
{
|
{
|
||||||
$this->where .= " AND c.fk_soc = ".$this->socid;
|
$this->where .= " AND c.fk_soc = ".$this->socid;
|
||||||
|
|||||||
@ -2652,25 +2652,29 @@ if ($action == 'create')
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Intracomm report
|
// Intracomm report
|
||||||
$langs->loadLangs(array("intracommreport"));
|
if (!empty($conf->intracommreport->enabled)) {
|
||||||
print '<tr><td class="nowrap">';
|
$langs->loadLangs(array("intracommreport"));
|
||||||
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
|
print '<tr><td class="nowrap">';
|
||||||
print $langs->trans('IntracommReportTransportMode');
|
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
|
||||||
print '</td>';
|
print $langs->trans('IntracommReportTransportMode');
|
||||||
if ($action != 'editmode' && $user->rights->fournisseur->facture->creer) {
|
print '</td>';
|
||||||
print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editmode&id='.$object->id.'">'.img_edit($langs->trans('SetMode'), 1).'</a></td>';
|
if ($action != 'editmode' && $user->rights->fournisseur->facture->creer) {
|
||||||
}
|
print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editmode&id='.$object->id.'">'.img_edit($langs->trans('SetMode'), 1).'</a></td>';
|
||||||
print '</tr></table>';
|
}
|
||||||
print '</td><td colspan="2">';
|
print '</tr></table>';
|
||||||
if ($action == 'editmode')
|
print '</td>';
|
||||||
{
|
|
||||||
$form->formSelectTransportMode($_SERVER['PHP_SELF'].'?id='.$object->id, $object->transport_mode_id, 'transport_mode_id', 1, 1);
|
print '<td>';
|
||||||
}
|
if ($action == 'editmode')
|
||||||
else {
|
{
|
||||||
$form->formSelectTransportMode($_SERVER['PHP_SELF'].'?id='.$object->id, $object->transport_mode_id, 'none');
|
$form->formSelectTransportMode($_SERVER['PHP_SELF'].'?id='.$object->id, $object->transport_mode_id, 'transport_mode_id', 1, 1);
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
else {
|
||||||
|
$form->formSelectTransportMode($_SERVER['PHP_SELF'].'?id='.$object->id, $object->transport_mode_id, 'none');
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$cols = 2;
|
$cols = 2;
|
||||||
|
|||||||
@ -12,6 +12,7 @@
|
|||||||
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
* Copyright (C) 2020 Demarest Maxime <maxime@indelog.fr>
|
* Copyright (C) 2020 Demarest Maxime <maxime@indelog.fr>
|
||||||
|
* Copyright (C) 2020 Charlene Benke <charlie@patas-monkey.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -1655,8 +1656,13 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead
|
|||||||
$helpbaseurl = '';
|
$helpbaseurl = '';
|
||||||
$helppage = '';
|
$helppage = '';
|
||||||
$mode = '';
|
$mode = '';
|
||||||
|
$helppresent = '';
|
||||||
|
|
||||||
if (empty($helppagename)) $helppagename = 'EN:User_documentation|FR:Documentation_utilisateur|ES:Documentación_usuarios';
|
if (empty($helppagename)) {
|
||||||
|
$helppagename = 'EN:User_documentation|FR:Documentation_utilisateur|ES:Documentación_usuarios';
|
||||||
|
} else {
|
||||||
|
$helppresent = 'helppresent';
|
||||||
|
}
|
||||||
|
|
||||||
// Get helpbaseurl, helppage and mode from helppagename and langs
|
// Get helpbaseurl, helppage and mode from helppagename and langs
|
||||||
$arrayres = getHelpParamFor($helppagename, $langs);
|
$arrayres = getHelpParamFor($helppagename, $langs);
|
||||||
@ -1674,7 +1680,7 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead
|
|||||||
if ($mode == 'wiki') $text .= sprintf($helpbaseurl, urlencode(html_entity_decode($helppage)));
|
if ($mode == 'wiki') $text .= sprintf($helpbaseurl, urlencode(html_entity_decode($helppage)));
|
||||||
else $text .= sprintf($helpbaseurl, $helppage);
|
else $text .= sprintf($helpbaseurl, $helppage);
|
||||||
$text .= '">';
|
$text .= '">';
|
||||||
$text .= '<span class="fa fa-question-circle atoplogin valignmiddle"></span>';
|
$text .= '<span class="fa fa-question-circle atoplogin valignmiddle'.($helppresent ? ' '.$helppresent : '').'"></span>';
|
||||||
$text .= '</a>';
|
$text .= '</a>';
|
||||||
$toprightmenu .= @Form::textwithtooltip('', $title, 2, 1, $text, 'login_block_elem', 2);
|
$toprightmenu .= @Form::textwithtooltip('', $title, 2, 1, $text, 'login_block_elem', 2);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2581,6 +2581,7 @@ font.vsmenudisabledmargin { margin: 1px 1px 1px 6px; }
|
|||||||
li a.vsmenudisabled, li.vsmenudisabled { color: #aaa !important; }
|
li a.vsmenudisabled, li.vsmenudisabled { color: #aaa !important; }
|
||||||
|
|
||||||
a.help:link, a.help:visited, a.help:hover, a.help:active, span.help { text-align: <?php print $left; ?>; color: #aaa; text-decoration: none; }
|
a.help:link, a.help:visited, a.help:hover, a.help:active, span.help { text-align: <?php print $left; ?>; color: #aaa; text-decoration: none; }
|
||||||
|
.helppresent, .helppresent:hover { color: #f3e4ac !important; }
|
||||||
|
|
||||||
.vmenu div.blockvmenufirst, .vmenu div.blockvmenulogo, .vmenu div.blockvmenusearchphone, .vmenu div.blockvmenubookmarks
|
.vmenu div.blockvmenufirst, .vmenu div.blockvmenulogo, .vmenu div.blockvmenusearchphone, .vmenu div.blockvmenubookmarks
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user