forked from Wavyzz/dolibarr
clean indent
This commit is contained in:
@@ -186,7 +186,7 @@
|
|||||||
<!-- Check indent are done with spaces and with correct number -->
|
<!-- Check indent are done with spaces and with correct number -->
|
||||||
<!-- Disabled as this does not support tab -->
|
<!-- Disabled as this does not support tab -->
|
||||||
<!-- <rule ref="Generic.WhiteSpace.ScopeIndent" /> -->
|
<!-- <rule ref="Generic.WhiteSpace.ScopeIndent" /> -->
|
||||||
<!-- TODO Enable this
|
|
||||||
<arg name="tab-width" value="4"/>
|
<arg name="tab-width" value="4"/>
|
||||||
<rule ref="Generic.WhiteSpace.ScopeIndent">
|
<rule ref="Generic.WhiteSpace.ScopeIndent">
|
||||||
<properties>
|
<properties>
|
||||||
@@ -194,7 +194,7 @@
|
|||||||
<property name="tabIndent" value="true"/>
|
<property name="tabIndent" value="true"/>
|
||||||
</properties>
|
</properties>
|
||||||
</rule>
|
</rule>
|
||||||
-->
|
|
||||||
|
|
||||||
<rule ref="Squiz.WhiteSpace.ScopeClosingBrace.Indent" />
|
<rule ref="Squiz.WhiteSpace.ScopeClosingBrace.Indent" />
|
||||||
|
|
||||||
|
|||||||
@@ -82,8 +82,8 @@ elseif (GETPOST('linkit', 'none') && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
||||||
{
|
{
|
||||||
$urlfile = GETPOST('urlfile', 'alpha', 0, null, null, 1); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
$urlfile = GETPOST('urlfile', 'alpha', 0, null, null, 1); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
||||||
if (GETPOST('section', 'alpha')) // For a delete from the ECM module, upload_dir is ECM root dir and urlfile contains relative path from upload_dir
|
if (GETPOST('section', 'alpha')) {
|
||||||
{
|
// For a delete from the ECM module, upload_dir is ECM root dir and urlfile contains relative path from upload_dir
|
||||||
$file = $upload_dir . (preg_match('/\/$/', $upload_dir) ? '' : '/') . $urlfile;
|
$file = $upload_dir . (preg_match('/\/$/', $upload_dir) ? '' : '/') . $urlfile;
|
||||||
}
|
}
|
||||||
else // For a delete from the file manager into another module, or from documents pages, upload_dir contains already path to file from module dir, so we clean path into urlfile.
|
else // For a delete from the file manager into another module, or from documents pages, upload_dir contains already path to file from module dir, so we clean path into urlfile.
|
||||||
@@ -94,8 +94,8 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
|||||||
}
|
}
|
||||||
$linkid = GETPOST('linkid', 'int');
|
$linkid = GETPOST('linkid', 'int');
|
||||||
|
|
||||||
if ($urlfile) // delete of a file
|
if ($urlfile) {
|
||||||
{
|
// delete of a file
|
||||||
$dir = dirname($file).'/'; // Chemin du dossier contenant l'image d'origine
|
$dir = dirname($file).'/'; // Chemin du dossier contenant l'image d'origine
|
||||||
$dirthumb = $dir.'/thumbs/'; // Chemin du dossier contenant la vignette (if file is an image)
|
$dirthumb = $dir.'/thumbs/'; // Chemin du dossier contenant la vignette (if file is an image)
|
||||||
|
|
||||||
@@ -118,8 +118,11 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($ret) setEventMessages($langs->trans("FileWasRemoved", $urlfile), null, 'mesgs');
|
if ($ret) {
|
||||||
else setEventMessages($langs->trans("ErrorFailToDeleteFile", $urlfile), null, 'errors');
|
setEventMessages($langs->trans("FileWasRemoved", $urlfile), null, 'mesgs');
|
||||||
|
} else {
|
||||||
|
setEventMessages($langs->trans("ErrorFailToDeleteFile", $urlfile), null, 'errors');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
elseif ($linkid) // delete of external link
|
elseif ($linkid) // delete of external link
|
||||||
{
|
{
|
||||||
@@ -140,10 +143,8 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_object($object) && $object->id > 0)
|
if (is_object($object) && $object->id > 0) {
|
||||||
{
|
if ($backtopage) {
|
||||||
if ($backtopage)
|
|
||||||
{
|
|
||||||
header('Location: ' . $backtopage);
|
header('Location: ' . $backtopage);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -220,8 +220,7 @@ class DoliDBMssql extends DoliDB
|
|||||||
*/
|
*/
|
||||||
public function close()
|
public function close()
|
||||||
{
|
{
|
||||||
if ($this->db)
|
if ($this->db) {
|
||||||
{
|
|
||||||
if ($this->transaction_opened > 0) dol_syslog(get_class($this)."::close Closing a connection with an opened transaction depth=".$this->transaction_opened, LOG_ERR);
|
if ($this->transaction_opened > 0) dol_syslog(get_class($this)."::close Closing a connection with an opened transaction depth=".$this->transaction_opened, LOG_ERR);
|
||||||
$this->connected=false;
|
$this->connected=false;
|
||||||
return mssql_close($this->db);
|
return mssql_close($this->db);
|
||||||
|
|||||||
@@ -1135,13 +1135,16 @@ class DoliDBPgsql extends DoliDB
|
|||||||
$sql .= " ".$field_desc['attribute'];
|
$sql .= " ".$field_desc['attribute'];
|
||||||
if (preg_match("/^[^\s]/i", $field_desc['null']))
|
if (preg_match("/^[^\s]/i", $field_desc['null']))
|
||||||
$sql .= " ".$field_desc['null'];
|
$sql .= " ".$field_desc['null'];
|
||||||
if (preg_match("/^[^\s]/i", $field_desc['default']))
|
if (preg_match("/^[^\s]/i", $field_desc['default'])) {
|
||||||
if (preg_match("/null/i", $field_desc['default']))
|
if (preg_match("/null/i", $field_desc['default'])) {
|
||||||
$sql .= " default ".$field_desc['default'];
|
$sql .= " default ".$field_desc['default'];
|
||||||
else
|
} else {
|
||||||
$sql .= " default '".$field_desc['default']."'";
|
$sql .= " default '".$field_desc['default']."'";
|
||||||
if (preg_match("/^[^\s]/i", $field_desc['extra']))
|
}
|
||||||
|
}
|
||||||
|
if (preg_match("/^[^\s]/i", $field_desc['extra'])) {
|
||||||
$sql .= " ".$field_desc['extra'];
|
$sql .= " ".$field_desc['extra'];
|
||||||
|
}
|
||||||
$sql .= " ".$field_position;
|
$sql .= " ".$field_position;
|
||||||
|
|
||||||
dol_syslog($sql, LOG_DEBUG);
|
dol_syslog($sql, LOG_DEBUG);
|
||||||
|
|||||||
@@ -1081,7 +1081,7 @@ function price2numjs(amount) {
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (empty($conf->global->MAIN_DISABLE_JQUERY_JNOTIFY) && ! defined('DISABLE_JQUERY_JNOTIFY')) {
|
if (empty($conf->global->MAIN_DISABLE_JQUERY_JNOTIFY) && ! defined('DISABLE_JQUERY_JNOTIFY')) {
|
||||||
?>
|
?>
|
||||||
// Defined properties for JNotify
|
// Defined properties for JNotify
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
if (typeof $.jnotify == 'function')
|
if (typeof $.jnotify == 'function')
|
||||||
|
|||||||
@@ -240,7 +240,6 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest)
|
|||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('main', 'other', 'errors'));
|
$langs->loadLangs(array('main', 'other', 'errors'));
|
||||||
;
|
|
||||||
$_SESSION["dol_loginmesg"]=($ldap->error?$ldap->error:$langs->trans("ErrorBadLoginPassword"));
|
$_SESSION["dol_loginmesg"]=($ldap->error?$ldap->error:$langs->trans("ErrorBadLoginPassword"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -307,10 +307,12 @@ class MenuManager
|
|||||||
print $val2['titre'];
|
print $val2['titre'];
|
||||||
if ($relurl2)
|
if ($relurl2)
|
||||||
{
|
{
|
||||||
if ($val2['enabled']) // Allowed
|
if ($val2['enabled']) {
|
||||||
|
// Allowed
|
||||||
print '</a>';
|
print '</a>';
|
||||||
else
|
} else {
|
||||||
print '</a>';
|
print '</a>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
print '</li>'."\n";
|
print '</li>'."\n";
|
||||||
}
|
}
|
||||||
@@ -448,7 +450,7 @@ class MenuManager
|
|||||||
unset($this->menu->liste);
|
unset($this->menu->liste);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
if ($mode == 'jmobile')
|
if ($mode == 'jmobile')
|
||||||
{
|
{
|
||||||
foreach($this->menu->liste as $key => $val) // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu'
|
foreach($this->menu->liste as $key => $val) // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu'
|
||||||
@@ -506,7 +508,7 @@ class MenuManager
|
|||||||
break; // Only first menu entry (so home)
|
break; // Only first menu entry (so home)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
unset($this->menu);
|
unset($this->menu);
|
||||||
|
|
||||||
return $res;
|
return $res;
|
||||||
|
|||||||
@@ -952,8 +952,6 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
{
|
{
|
||||||
//$this->atleastoneratenotnull++;
|
//$this->atleastoneratenotnull++;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$index++;
|
$index++;
|
||||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@@ -1107,7 +1107,6 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
if ($tvakey!=0) // On affiche pas taux 0
|
if ($tvakey!=0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
//$this->atleastoneratenotnull++;
|
//$this->atleastoneratenotnull++;
|
||||||
|
|
||||||
$index++;
|
$index++;
|
||||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||||
|
|
||||||
@@ -1139,8 +1138,6 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
{
|
{
|
||||||
//$this->atleastoneratenotnull++;
|
//$this->atleastoneratenotnull++;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$index++;
|
$index++;
|
||||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||||
|
|
||||||
|
|||||||
@@ -324,8 +324,7 @@ class html_cerfafr extends ModeleDon
|
|||||||
if ($unite[$i]==1) {
|
if ($unite[$i]==1) {
|
||||||
$secon[$i]='vingt et';
|
$secon[$i]='vingt et';
|
||||||
$prim[$i]=$chif[$unite[$i]];
|
$prim[$i]=$chif[$unite[$i]];
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$secon[$i]='vingt';
|
$secon[$i]='vingt';
|
||||||
$prim[$i]=$chif[$unite[$i]];
|
$prim[$i]=$chif[$unite[$i]];
|
||||||
}
|
}
|
||||||
@@ -334,8 +333,7 @@ class html_cerfafr extends ModeleDon
|
|||||||
if ($unite[$i]==1) {
|
if ($unite[$i]==1) {
|
||||||
$secon[$i]='trente et';
|
$secon[$i]='trente et';
|
||||||
$prim[$i]=$chif[$unite[$i]];
|
$prim[$i]=$chif[$unite[$i]];
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$secon[$i]='trente';
|
$secon[$i]='trente';
|
||||||
$prim[$i]=$chif[$unite[$i]];
|
$prim[$i]=$chif[$unite[$i]];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -218,10 +218,9 @@ class pdf_rouget extends ModelePdfExpedition
|
|||||||
|
|
||||||
$realpath='';
|
$realpath='';
|
||||||
|
|
||||||
foreach ($objphoto->liste_photos($dir, 1) as $key => $obj)
|
foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) {
|
||||||
{
|
if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) {
|
||||||
if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo
|
// If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo
|
||||||
{
|
|
||||||
if ($obj['photo_vignette'])
|
if ($obj['photo_vignette'])
|
||||||
{
|
{
|
||||||
$filename= $obj['photo_vignette'];
|
$filename= $obj['photo_vignette'];
|
||||||
|
|||||||
@@ -139,19 +139,19 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport
|
|||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
|
|
||||||
if($db->num_rows($result) > 0):
|
if ($db->num_rows($result) > 0) {
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
$newref = $objp->max;
|
$newref = $objp->max;
|
||||||
$newref++;
|
$newref++;
|
||||||
while(strlen($newref) < $num_car):
|
while (strlen($newref) < $num_car) {
|
||||||
$newref = "0".$newref;
|
$newref = "0".$newref;
|
||||||
endwhile;
|
}
|
||||||
else:
|
} else {
|
||||||
$newref = 1;
|
$newref = 1;
|
||||||
while(strlen($newref) < $num_car):
|
while (strlen($newref) < $num_car) {
|
||||||
$newref = "0".$newref;
|
$newref = "0".$newref;
|
||||||
endwhile;
|
}
|
||||||
endif;
|
}
|
||||||
|
|
||||||
$ref_number_int = ($newref+1)-1;
|
$ref_number_int = ($newref+1)-1;
|
||||||
|
|
||||||
|
|||||||
@@ -1271,8 +1271,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
//Local tax 1 after VAT
|
//Local tax 1 after VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||||
//{
|
//{
|
||||||
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
foreach ($this->localtax1 as $localtax_type => $localtax_rate) {
|
||||||
{
|
|
||||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||||
|
|
||||||
foreach($localtax_rate as $tvakey => $tvaval)
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
|
|||||||
@@ -371,7 +371,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
|
|
||||||
// Does we have at least one line with discount $this->atleastonediscount
|
// Does we have at least one line with discount $this->atleastonediscount
|
||||||
foreach ($object->lines as $line) {
|
foreach ($object->lines as $line) {
|
||||||
if ($line->remise_percent){
|
if ($line->remise_percent) {
|
||||||
$this->atleastonediscount = true;
|
$this->atleastonediscount = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -769,10 +769,12 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
}
|
}
|
||||||
|
|
||||||
// retrieve global local tax
|
// retrieve global local tax
|
||||||
if ($localtax1_type && $localtax1ligne != 0)
|
if ($localtax1_type && $localtax1ligne != 0) {
|
||||||
$this->localtax1[$localtax1_type][$localtax1_rate]+=$localtax1ligne;
|
$this->localtax1[$localtax1_type][$localtax1_rate]+=$localtax1ligne;
|
||||||
if ($localtax2_type && $localtax2ligne != 0)
|
}
|
||||||
|
if ($localtax2_type && $localtax2ligne != 0) {
|
||||||
$this->localtax2[$localtax2_type][$localtax2_rate]+=$localtax2ligne;
|
$this->localtax2[$localtax2_type][$localtax2_rate]+=$localtax2ligne;
|
||||||
|
}
|
||||||
|
|
||||||
if (($object->lines[$i]->info_bits & 0x01) == 0x01) $vatrate.='*';
|
if (($object->lines[$i]->info_bits & 0x01) == 0x01) $vatrate.='*';
|
||||||
if (! isset($this->tva[$vatrate])) $this->tva[$vatrate]=0;
|
if (! isset($this->tva[$vatrate])) $this->tva[$vatrate]=0;
|
||||||
@@ -781,8 +783,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
$nexY = max($nexY, $posYAfterImage);
|
$nexY = max($nexY, $posYAfterImage);
|
||||||
|
|
||||||
// Add line
|
// Add line
|
||||||
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1))
|
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) {
|
||||||
{
|
|
||||||
$pdf->setPage($pageposafter);
|
$pdf->setPage($pageposafter);
|
||||||
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
|
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
|
||||||
//$pdf->SetDrawColor(190,190,200);
|
//$pdf->SetDrawColor(190,190,200);
|
||||||
@@ -793,11 +794,9 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
$nexY+=2; // Add space between lines
|
$nexY+=2; // Add space between lines
|
||||||
|
|
||||||
// Detect if some page were added automatically and output _tableau for past pages
|
// Detect if some page were added automatically and output _tableau for past pages
|
||||||
while ($pagenb < $pageposafter)
|
while ($pagenb < $pageposafter) {
|
||||||
{
|
|
||||||
$pdf->setPage($pagenb);
|
$pdf->setPage($pagenb);
|
||||||
if ($pagenb == $pageposbeforeprintlines)
|
if ($pagenb == $pageposbeforeprintlines) {
|
||||||
{
|
|
||||||
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code);
|
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -811,10 +810,8 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
}
|
}
|
||||||
|
|
||||||
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)
|
|
||||||
{
|
|
||||||
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code);
|
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1266,14 +1263,11 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
|
|
||||||
$deja_paye = 0;
|
$deja_paye = 0;
|
||||||
$i = 1;
|
$i = 1;
|
||||||
if(!empty($TPreviousIncoice)){
|
if (!empty($TPreviousIncoice)) {
|
||||||
$pdf->setY($tab2_top);
|
$pdf->setY($tab2_top);
|
||||||
$posy = $pdf->GetY();
|
$posy = $pdf->GetY();
|
||||||
|
|
||||||
|
foreach ($TPreviousIncoice as &$fac) {
|
||||||
|
|
||||||
|
|
||||||
foreach ($TPreviousIncoice as &$fac){
|
|
||||||
if($posy > $this->page_hauteur - 4 ) {
|
if($posy > $this->page_hauteur - 4 ) {
|
||||||
$this->_pagefoot($pdf, $object, $outputlangs, 1);
|
$this->_pagefoot($pdf, $object, $outputlangs, 1);
|
||||||
$pdf->addPage();
|
$pdf->addPage();
|
||||||
@@ -1290,7 +1284,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
$pdf->SetXY($col2x, $posy);
|
$pdf->SetXY($col2x, $posy);
|
||||||
|
|
||||||
$facSign = '';
|
$facSign = '';
|
||||||
if($i>1){
|
if ($i>1) {
|
||||||
$facSign = $fac->total_ht>=0?'+':'';
|
$facSign = $fac->total_ht>=0?'+':'';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1312,11 +1306,11 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
|
|
||||||
$pdf->SetXY($col2x, $posy);
|
$pdf->SetXY($col2x, $posy);
|
||||||
$facSign = '';
|
$facSign = '';
|
||||||
if($i>1){
|
if ($i>1) {
|
||||||
$facSign = $object->total_ht>=0?'+':''; // management of a particular customer case
|
$facSign = $object->total_ht>=0?'+':''; // management of a particular customer case
|
||||||
}
|
}
|
||||||
|
|
||||||
if($fac->type === facture::TYPE_CREDIT_NOTE){
|
if ($fac->type === facture::TYPE_CREDIT_NOTE) {
|
||||||
$facSign = '-'; // les avoirs
|
$facSign = '-'; // les avoirs
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1453,8 +1447,6 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
{
|
{
|
||||||
//$this->atleastoneratenotnull++;
|
//$this->atleastoneratenotnull++;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$index++;
|
$index++;
|
||||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||||
|
|
||||||
@@ -1473,7 +1465,6 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//}
|
//}
|
||||||
|
|
||||||
// VAT
|
// VAT
|
||||||
|
|||||||
@@ -502,7 +502,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||||||
|
|
||||||
|
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||||
/*
|
/*
|
||||||
$pdf->SetXY($this->marge_gauche, $tab_top);
|
$pdf->SetXY($this->marge_gauche, $tab_top);
|
||||||
$pdf->MultiCell(190,8,$outputlangs->transnoentities("Description"),0,'L',0);
|
$pdf->MultiCell(190,8,$outputlangs->transnoentities("Description"),0,'L',0);
|
||||||
$pdf->line($this->marge_gauche, $tab_top + 8, $this->page_largeur-$this->marge_droite, $tab_top + 8);
|
$pdf->line($this->marge_gauche, $tab_top + 8, $this->page_largeur-$this->marge_droite, $tab_top + 8);
|
||||||
@@ -526,7 +526,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||||||
$pdf->line($this->marge_gauche, $nexY, $this->page_largeur-$this->marge_droite, $nexY);
|
$pdf->line($this->marge_gauche, $nexY, $this->page_largeur-$this->marge_droite, $nexY);
|
||||||
|
|
||||||
$pdf->MultiCell(0, 3, ''); // Set interline to 3. Then writeMultiCell must use 3 also.
|
$pdf->MultiCell(0, 3, ''); // Set interline to 3. Then writeMultiCell must use 3 also.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Output Rect
|
// Output Rect
|
||||||
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height+1, 0, 0); // Rect takes a length in 3rd parameter and 4th parameter
|
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height+1, 0, 0); // Rect takes a length in 3rd parameter and 4th parameter
|
||||||
|
|||||||
@@ -255,7 +255,9 @@ class mailing_fraise extends MailingTargets
|
|||||||
$sql.= " WHERE a.entity IN (".getEntity('member').") AND a.email <> ''"; // Note that null != '' is false
|
$sql.= " WHERE a.entity IN (".getEntity('member').") AND a.email <> ''"; // Note that null != '' is false
|
||||||
$sql.= " AND a.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$this->db->escape($mailing_id).")";
|
$sql.= " AND a.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$this->db->escape($mailing_id).")";
|
||||||
// Filter on status
|
// Filter on status
|
||||||
if (isset($_POST["filter"]) && $_POST["filter"] == '-1') $sql.= " AND a.statut=-1";
|
if (isset($_POST["filter"]) && $_POST["filter"] == '-1') {
|
||||||
|
$sql.= " AND a.statut=-1";
|
||||||
|
}
|
||||||
if (isset($_POST["filter"]) && $_POST["filter"] == '1a') $sql.= " AND a.statut=1 AND (a.datefin >= '".$this->db->idate($now)."' OR ta.subscription = 0)";
|
if (isset($_POST["filter"]) && $_POST["filter"] == '1a') $sql.= " AND a.statut=1 AND (a.datefin >= '".$this->db->idate($now)."' OR ta.subscription = 0)";
|
||||||
if (isset($_POST["filter"]) && $_POST["filter"] == '1b') $sql.= " AND a.statut=1 AND ((a.datefin IS NULL or a.datefin < '".$this->db->idate($now)."') AND ta.subscription = 1)";
|
if (isset($_POST["filter"]) && $_POST["filter"] == '1b') $sql.= " AND a.statut=1 AND ((a.datefin IS NULL or a.datefin < '".$this->db->idate($now)."') AND ta.subscription = 1)";
|
||||||
if (isset($_POST["filter"]) && $_POST["filter"] == '0') $sql.= " AND a.statut=0";
|
if (isset($_POST["filter"]) && $_POST["filter"] == '0') $sql.= " AND a.statut=0";
|
||||||
|
|||||||
@@ -291,8 +291,7 @@ class mailing_thirdparties extends MailingTargets
|
|||||||
$s.= $langs->trans('ProspectCustomer');
|
$s.= $langs->trans('ProspectCustomer');
|
||||||
$s.=': <select name="filter_client" class="flat">';
|
$s.=': <select name="filter_client" class="flat">';
|
||||||
$s.= '<option value="-1"> </option>';
|
$s.= '<option value="-1"> </option>';
|
||||||
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS))
|
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) {
|
||||||
{
|
|
||||||
$s.= '<option value="2">'.$langs->trans('Prospect').'</option>';
|
$s.= '<option value="2">'.$langs->trans('Prospect').'</option>';
|
||||||
}
|
}
|
||||||
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTSCUSTOMERS)) {
|
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTSCUSTOMERS)) {
|
||||||
@@ -303,14 +302,14 @@ class mailing_thirdparties extends MailingTargets
|
|||||||
}
|
}
|
||||||
$s.= '<option value="0">'.$langs->trans('NorProspectNorCustomer').'</option>';
|
$s.= '<option value="0">'.$langs->trans('NorProspectNorCustomer').'</option>';
|
||||||
|
|
||||||
$s.='</select> ';
|
$s.= '</select> ';
|
||||||
|
|
||||||
$s.=$langs->trans("Status");
|
$s.= $langs->trans("Status");
|
||||||
$s.=': <select name="filter_status" class="flat">';
|
$s.= ': <select name="filter_status" class="flat">';
|
||||||
$s.='<option value="-1"> </option>';
|
$s.= '<option value="-1"> </option>';
|
||||||
$s.='<option value="1" selected>'.$langs->trans("Enabled").'</option>';
|
$s.= '<option value="1" selected>'.$langs->trans("Enabled").'</option>';
|
||||||
$s.='<option value="0">'.$langs->trans("Disabled").'</option>';
|
$s.= '<option value="0">'.$langs->trans("Disabled").'</option>';
|
||||||
$s.='</select>';
|
$s.= '</select>';
|
||||||
return $s;
|
return $s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -72,7 +72,8 @@ class modComptabilite extends DolibarrModules
|
|||||||
$this->const = array();
|
$this->const = array();
|
||||||
|
|
||||||
// Data directories to create when module is enabled
|
// Data directories to create when module is enabled
|
||||||
$this->dirs = array("/comptabilite/temp",
|
$this->dirs = array(
|
||||||
|
"/comptabilite/temp",
|
||||||
"/comptabilite/rapport",
|
"/comptabilite/rapport",
|
||||||
"/comptabilite/export",
|
"/comptabilite/export",
|
||||||
"/comptabilite/bordereau"
|
"/comptabilite/bordereau"
|
||||||
|
|||||||
@@ -298,8 +298,7 @@ class modExpedition extends DolibarrModules
|
|||||||
$this->export_sql_end[$r] .=' , '.MAIN_DB_PREFIX.'commandedet as cd';
|
$this->export_sql_end[$r] .=' , '.MAIN_DB_PREFIX.'commandedet as cd';
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on cd.fk_product = p.rowid';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on cd.fk_product = p.rowid';
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extraprod ON p.rowid = extraprod.fk_object';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extraprod ON p.rowid = extraprod.fk_object';
|
||||||
if ($idcontacts && ! empty($conf->global->SHIPMENT_ADD_CONTACTS_IN_EXPORT))
|
if ($idcontacts && ! empty($conf->global->SHIPMENT_ADD_CONTACTS_IN_EXPORT)) {
|
||||||
{
|
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'element_contact as ee ON ee.element_id = cd.fk_commande AND ee.fk_c_type_contact IN ('.$idcontacts.')';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'element_contact as ee ON ee.element_id = cd.fk_commande AND ee.fk_c_type_contact IN ('.$idcontacts.')';
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople as sp ON sp.rowid = ee.fk_socpeople';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople as sp ON sp.rowid = ee.fk_socpeople';
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople_extrafields as extra3 ON sp.rowid = extra3.fk_object';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople_extrafields as extra3 ON sp.rowid = extra3.fk_object';
|
||||||
|
|||||||
@@ -223,8 +223,7 @@ class modReception extends DolibarrModules
|
|||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'commande_fournisseur_dispatch_extrafields as extra2 ON ed.rowid = extra2.fk_object';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'commande_fournisseur_dispatch_extrafields as extra2 ON ed.rowid = extra2.fk_object';
|
||||||
$this->export_sql_end[$r] .=' , '.MAIN_DB_PREFIX.'commande_fournisseurdet as cd';
|
$this->export_sql_end[$r] .=' , '.MAIN_DB_PREFIX.'commande_fournisseurdet as cd';
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on cd.fk_product = p.rowid';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on cd.fk_product = p.rowid';
|
||||||
if ($idcontacts && ! empty($conf->global->RECEPTION_ADD_CONTACTS_IN_EXPORT))
|
if ($idcontacts && ! empty($conf->global->RECEPTION_ADD_CONTACTS_IN_EXPORT)) {
|
||||||
{
|
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'element_contact as ee ON ee.element_id = cd.fk_commande AND ee.fk_c_type_contact IN ('.$idcontacts.')';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'element_contact as ee ON ee.element_id = cd.fk_commande AND ee.fk_c_type_contact IN ('.$idcontacts.')';
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople as sp ON sp.rowid = ee.fk_socpeople';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople as sp ON sp.rowid = ee.fk_socpeople';
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople_extrafields as extra3 ON sp.rowid = extra3.fk_object';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople_extrafields as extra3 ON sp.rowid = extra3.fk_object';
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ class modSociete extends DolibarrModules
|
|||||||
$this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
|
$this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
|
||||||
$this->rights[$r][4] = 'lire';
|
$this->rights[$r][4] = 'lire';
|
||||||
|
|
||||||
/* $r++;
|
/*$r++;
|
||||||
$this->rights[$r][0] = 241;
|
$this->rights[$r][0] = 241;
|
||||||
$this->rights[$r][1] = 'Read thirdparties customers';
|
$this->rights[$r][1] = 'Read thirdparties customers';
|
||||||
$this->rights[$r][2] = 'r';
|
$this->rights[$r][2] = 'r';
|
||||||
@@ -163,7 +163,7 @@ class modSociete extends DolibarrModules
|
|||||||
$this->rights[$r][3] = 0;
|
$this->rights[$r][3] = 0;
|
||||||
$this->rights[$r][4] = 'thirdparty_supplier_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on
|
$this->rights[$r][4] = 'thirdparty_supplier_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on
|
||||||
$this->rights[$r][5] = 'read';
|
$this->rights[$r][5] = 'read';
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$r++;
|
$r++;
|
||||||
$this->rights[$r][0] = 122; // id de la permission
|
$this->rights[$r][0] = 122; // id de la permission
|
||||||
@@ -172,7 +172,7 @@ class modSociete extends DolibarrModules
|
|||||||
$this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
|
$this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
|
||||||
$this->rights[$r][4] = 'creer';
|
$this->rights[$r][4] = 'creer';
|
||||||
|
|
||||||
/* $r++;
|
/* $r++;
|
||||||
$this->rights[$r][0] = 251;
|
$this->rights[$r][0] = 251;
|
||||||
$this->rights[$r][1] = 'Create thirdparties customers';
|
$this->rights[$r][1] = 'Create thirdparties customers';
|
||||||
$this->rights[$r][2] = 'r';
|
$this->rights[$r][2] = 'r';
|
||||||
@@ -187,7 +187,7 @@ class modSociete extends DolibarrModules
|
|||||||
$this->rights[$r][3] = 0;
|
$this->rights[$r][3] = 0;
|
||||||
$this->rights[$r][4] = 'thirdparty_supplier_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on
|
$this->rights[$r][4] = 'thirdparty_supplier_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on
|
||||||
$this->rights[$r][5] = 'read';
|
$this->rights[$r][5] = 'read';
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$r++;
|
$r++;
|
||||||
$this->rights[$r][0] = 125; // id de la permission
|
$this->rights[$r][0] = 125; // id de la permission
|
||||||
|
|||||||
@@ -82,8 +82,8 @@ class modStripe extends DolibarrModules
|
|||||||
// New pages on tabs
|
// New pages on tabs
|
||||||
$this->tabs = array();
|
$this->tabs = array();
|
||||||
|
|
||||||
// Boxes
|
// List of boxes
|
||||||
$this->boxes = array(); // List of boxes
|
$this->boxes = array();
|
||||||
$r=0;
|
$r=0;
|
||||||
|
|
||||||
// Permissions
|
// Permissions
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ class modVariants extends DolibarrModules
|
|||||||
|
|
||||||
// Array to add new pages in new tabs
|
// Array to add new pages in new tabs
|
||||||
$this->tabs = array(
|
$this->tabs = array(
|
||||||
// 'product:+combinations:Combinaciones:products:1:/variants/combinations.php?id=__ID__'
|
// 'product:+combinations:Combinaciones:products:1:/variants/combinations.php?id=__ID__'
|
||||||
);
|
);
|
||||||
|
|
||||||
// Dictionaries
|
// Dictionaries
|
||||||
|
|||||||
@@ -186,14 +186,12 @@ class modWebsite extends DolibarrModules
|
|||||||
dol_mkdir($destroot);
|
dol_mkdir($destroot);
|
||||||
|
|
||||||
$docs=dol_dir_list($srcroot, 'files', 0, 'website_.*(\.zip|\.jpg)$');
|
$docs=dol_dir_list($srcroot, 'files', 0, 'website_.*(\.zip|\.jpg)$');
|
||||||
foreach($docs as $cursorfile)
|
foreach($docs as $cursorfile) {
|
||||||
{
|
|
||||||
$src=$srcroot.'/'.$cursorfile['name'];
|
$src=$srcroot.'/'.$cursorfile['name'];
|
||||||
$dest=$destroot.'/'.$cursorfile['name'];
|
$dest=$destroot.'/'.$cursorfile['name'];
|
||||||
|
|
||||||
$result=dol_copy($src, $dest, 0, 0);
|
$result=dol_copy($src, $dest, 0, 0);
|
||||||
if ($result < 0)
|
if ($result < 0) {
|
||||||
{
|
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$this->error=$langs->trans('ErrorFailToCopyFile', $src, $dest);
|
$this->error=$langs->trans('ErrorFailToCopyFile', $src, $dest);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -668,8 +668,7 @@ class pdf_standard extends ModelePDFProduct
|
|||||||
$pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height);
|
$pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height);
|
||||||
if (empty($hidetop)) {
|
if (empty($hidetop)) {
|
||||||
$pdf->SetXY($this->posxunit - 1, $tab_top + 1);
|
$pdf->SetXY($this->posxunit - 1, $tab_top + 1);
|
||||||
$pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("Unit"), '',
|
$pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("Unit"), '', 'C');
|
||||||
'C');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -142,10 +142,9 @@ class pdf_squille extends ModelePdfReception
|
|||||||
|
|
||||||
$realpath='';
|
$realpath='';
|
||||||
|
|
||||||
foreach ($objphoto->liste_photos($dir, 1) as $key => $obj)
|
foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) {
|
||||||
{
|
if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) {
|
||||||
if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo
|
// If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo
|
||||||
{
|
|
||||||
if ($obj['photo_vignette'])
|
if ($obj['photo_vignette'])
|
||||||
{
|
{
|
||||||
$filename= $obj['photo_vignette'];
|
$filename= $obj['photo_vignette'];
|
||||||
@@ -461,8 +460,7 @@ class pdf_squille extends ModelePdfReception
|
|||||||
$pdf->writeHTMLCell($this->posxqtyordered - $this->posxweightvol + 2, 3, $this->posxweightvol - 1, $curY, $weighttxt.(($weighttxt && $voltxt)?'<br>':'').$voltxt, 0, 0, false, true, 'C');
|
$pdf->writeHTMLCell($this->posxqtyordered - $this->posxweightvol + 2, 3, $this->posxweightvol - 1, $curY, $weighttxt.(($weighttxt && $voltxt)?'<br>':'').$voltxt, 0, 0, false, true, 'C');
|
||||||
//$pdf->MultiCell(($this->posxqtyordered - $this->posxweightvol), 3, $weighttxt.(($weighttxt && $voltxt)?'<br>':'').$voltxt,'','C');
|
//$pdf->MultiCell(($this->posxqtyordered - $this->posxweightvol), 3, $weighttxt.(($weighttxt && $voltxt)?'<br>':'').$voltxt,'','C');
|
||||||
|
|
||||||
if (empty($conf->global->RECEPTION_PDF_HIDE_ORDERED))
|
if (empty($conf->global->RECEPTION_PDF_HIDE_ORDERED)) {
|
||||||
{
|
|
||||||
$pdf->SetXY($this->posxqtyordered, $curY);
|
$pdf->SetXY($this->posxqtyordered, $curY);
|
||||||
if($object->lines[$i]->fk_commandefourndet!=$fk_commandefourndet){
|
if($object->lines[$i]->fk_commandefourndet!=$fk_commandefourndet){
|
||||||
$pdf->MultiCell(($this->posxqtytoship - $this->posxqtyordered), 3, $object->lines[$i]->qty_asked, '', 'C');
|
$pdf->MultiCell(($this->posxqtytoship - $this->posxqtyordered), 3, $object->lines[$i]->qty_asked, '', 'C');
|
||||||
|
|||||||
@@ -198,8 +198,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add odtgeneration hook
|
// Add odtgeneration hook
|
||||||
if (! is_object($hookmanager))
|
if (! is_object($hookmanager)) {
|
||||||
{
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
||||||
$hookmanager=new HookManager($this->db);
|
$hookmanager=new HookManager($this->db);
|
||||||
}
|
}
|
||||||
@@ -412,8 +411,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
|||||||
$odfHandler->title = $object->builddoc_filename;
|
$odfHandler->title = $object->builddoc_filename;
|
||||||
$odfHandler->subject = $object->builddoc_filename;
|
$odfHandler->subject = $object->builddoc_filename;
|
||||||
|
|
||||||
if (! empty($conf->global->ODT_ADD_DOLIBARR_ID))
|
if (! empty($conf->global->ODT_ADD_DOLIBARR_ID)) {
|
||||||
{
|
|
||||||
$odfHandler->userdefined['dol_id'] = $object->id;
|
$odfHandler->userdefined['dol_id'] = $object->id;
|
||||||
$odfHandler->userdefined['dol_element'] = $object->element;
|
$odfHandler->userdefined['dol_element'] = $object->element;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -715,8 +715,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||||
//{
|
//{
|
||||||
//Local tax 1
|
//Local tax 1
|
||||||
foreach($this->localtax1 as $tvakey => $tvaval)
|
foreach ($this->localtax1 as $tvakey => $tvaval) {
|
||||||
{
|
|
||||||
if ($tvakey != 0) // On affiche pas taux 0
|
if ($tvakey != 0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
//$this->atleastoneratenotnull++;
|
//$this->atleastoneratenotnull++;
|
||||||
@@ -743,8 +742,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||||
//{
|
//{
|
||||||
//Local tax 2
|
//Local tax 2
|
||||||
foreach($this->localtax2 as $tvakey => $tvaval)
|
foreach($this->localtax2 as $tvakey => $tvaval) {
|
||||||
{
|
|
||||||
if ($tvakey != 0) // On affiche pas taux 0
|
if ($tvakey != 0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
//$this->atleastoneratenotnull++;
|
//$this->atleastoneratenotnull++;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||||
* Copyright (C) 2018-2019 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2018-2019 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
* Copyright (C) 2019 Tim Otte <otte@meuser.it>
|
* Copyright (C) 2019 Tim Otte <otte@meuser.it>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@@ -674,7 +674,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
|
|||||||
$text=$this->emetteur->name;
|
$text=$this->emetteur->name;
|
||||||
$pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
|
$pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
$pdf->SetFont('','B', $default_font_size + 3);
|
$pdf->SetFont('','B', $default_font_size + 3);
|
||||||
$pdf->SetXY($posx,$posy);
|
$pdf->SetXY($posx,$posy);
|
||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
@@ -734,7 +734,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
|
|||||||
|
|
||||||
// Show list of linked objects
|
// Show list of linked objects
|
||||||
$posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'R', $default_font_size);
|
$posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'R', $default_font_size);
|
||||||
*/
|
*/
|
||||||
if ($showaddress)
|
if ($showaddress)
|
||||||
{
|
{
|
||||||
// Sender properties
|
// Sender properties
|
||||||
|
|||||||
@@ -1345,12 +1345,12 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||||||
$pdf->SetTextColor(0, 0, 60);
|
$pdf->SetTextColor(0, 0, 60);
|
||||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("RefCustomer")." : " . $outputlangs->convToOutputCharset($object->ref_client), '', 'R');
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("RefCustomer")." : " . $outputlangs->convToOutputCharset($object->ref_client), '', 'R');
|
||||||
}
|
}
|
||||||
/* PHFAVRE
|
/* PHFAVRE
|
||||||
$posy+=4;
|
$posy+=4;
|
||||||
$pdf->SetXY($posx,$posy);
|
$pdf->SetXY($posx,$posy);
|
||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("SupplierProposalDate")." : " . dol_print_date($object->date_livraison,"day",false,$outputlangs,true), '', 'R');
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("SupplierProposalDate")." : " . dol_print_date($object->date_livraison, "day", false, $outputlangs, true), '', 'R');
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($object->thirdparty->code_fournisseur)
|
if ($object->thirdparty->code_fournisseur)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -47,195 +47,195 @@ print '<script type="text/javascript" language="javascript">
|
|||||||
</script>';
|
</script>';
|
||||||
|
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("AdvTgtTitle"));
|
print load_fiche_titre($langs->trans("AdvTgtTitle"));
|
||||||
|
|
||||||
print '<div class="tabBar">' . "\n";
|
print '<div class="tabBar">' . "\n";
|
||||||
print '<form name="find_customer" id="find_customer" action="' . $_SERVER['PHP_SELF'] . '?id=' . $id . '" method="POST">' . "\n";
|
print '<form name="find_customer" id="find_customer" action="' . $_SERVER['PHP_SELF'] . '?id=' . $id . '" method="POST">' . "\n";
|
||||||
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">' . "\n";
|
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">' . "\n";
|
||||||
print '<input type="hidden" name="action" value="">' . "\n";
|
print '<input type="hidden" name="action" value="">' . "\n";
|
||||||
print '<table class="border centpercent">' . "\n";
|
print '<table class="border centpercent">' . "\n";
|
||||||
|
|
||||||
print '<tr>' . "\n";
|
print '<tr>' . "\n";
|
||||||
print '<td colspan="3" class="right">' . "\n";
|
print '<td colspan="3" class="right">' . "\n";
|
||||||
|
|
||||||
print '<input type="button" name="addcontact" id="addcontact" value="' . $langs->trans('AdvTgtAddContact') . '" class="butAction"/>' . "\n";
|
print '<input type="button" name="addcontact" id="addcontact" value="' . $langs->trans('AdvTgtAddContact') . '" class="butAction"/>' . "\n";
|
||||||
|
|
||||||
print '</td>' . "\n";
|
print '</td>' . "\n";
|
||||||
print '</tr>' . "\n";
|
print '</tr>' . "\n";
|
||||||
|
|
||||||
print '<tr><td>' . $langs->trans('AdvTgtNameTemplate') . '</td><td>';
|
print '<tr><td>' . $langs->trans('AdvTgtNameTemplate') . '</td><td>';
|
||||||
if (! empty($template_id)) {
|
if (! empty($template_id)) {
|
||||||
$default_template = $template_id;
|
$default_template = $template_id;
|
||||||
} else {
|
} else {
|
||||||
$default_template = $advTarget->id;
|
$default_template = $advTarget->id;
|
||||||
}
|
}
|
||||||
print $formadvtargetemaling->selectAdvtargetemailingTemplate('template_id', $default_template, 0, $advTarget->type_element);
|
print $formadvtargetemaling->selectAdvtargetemailingTemplate('template_id', $default_template, 0, $advTarget->type_element);
|
||||||
print '<input type="button" name="loadfilter" id="loadfilter" value="' . $langs->trans('AdvTgtLoadFilter') . '" class="butAction"/>';
|
print '<input type="button" name="loadfilter" id="loadfilter" value="' . $langs->trans('AdvTgtLoadFilter') . '" class="butAction"/>';
|
||||||
print '<input type="button" name="deletefilter" id="deletefilter" value="' . $langs->trans('AdvTgtDeleteFilter') . '" class="butAction"/>';
|
print '<input type="button" name="deletefilter" id="deletefilter" value="' . $langs->trans('AdvTgtDeleteFilter') . '" class="butAction"/>';
|
||||||
print '<input type="button" name="savefilter" id="savefilter" value="' . $langs->trans('AdvTgtSaveFilter') . '" class="butAction"/>';
|
print '<input type="button" name="savefilter" id="savefilter" value="' . $langs->trans('AdvTgtSaveFilter') . '" class="butAction"/>';
|
||||||
print $langs->trans('AdvTgtOrCreateNewFilter');
|
print $langs->trans('AdvTgtOrCreateNewFilter');
|
||||||
print '<input type="text" name="template_name" id="template_name" value=""/>';
|
print '<input type="text" name="template_name" id="template_name" value=""/>';
|
||||||
print '<input type="button" name="createfilter" id="createfilter" value="' . $langs->trans('AdvTgtCreateFilter') . '" class="butAction"/>';
|
print '<input type="button" name="createfilter" id="createfilter" value="' . $langs->trans('AdvTgtCreateFilter') . '" class="butAction"/>';
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
print '</td></tr>' . "\n";
|
print '</td></tr>' . "\n";
|
||||||
|
|
||||||
print '<tr><td>' . $langs->trans('AdvTgtTypeOfIncude') . '</td><td>';
|
print '<tr><td>' . $langs->trans('AdvTgtTypeOfIncude') . '</td><td>';
|
||||||
print $form->selectarray('type_of_target', $advTarget->select_target_type, $array_query['type_of_target']);
|
print $form->selectarray('type_of_target', $advTarget->select_target_type, $array_query['type_of_target']);
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
print $form->textwithpicto('', $langs->trans("AdvTgtTypeOfIncudeHelp"), 1, 'help');
|
print $form->textwithpicto('', $langs->trans("AdvTgtTypeOfIncudeHelp"), 1, 'help');
|
||||||
print '</td></tr>' . "\n";
|
print '</td></tr>' . "\n";
|
||||||
|
|
||||||
// Customer name
|
// Customer name
|
||||||
print '<tr><td>' . $langs->trans('ThirdPartyName');
|
print '<tr><td>' . $langs->trans('ThirdPartyName');
|
||||||
if (! empty($array_query['cust_name'])) {
|
if (! empty($array_query['cust_name'])) {
|
||||||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||||
}
|
}
|
||||||
print '</td><td><input type="text" name="cust_name" value="' . $array_query['cust_name'] . '"/></td><td>' . "\n";
|
print '</td><td><input type="text" name="cust_name" value="' . $array_query['cust_name'] . '"/></td><td>' . "\n";
|
||||||
print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help');
|
print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help');
|
||||||
print '</td></tr>' . "\n";
|
print '</td></tr>' . "\n";
|
||||||
|
|
||||||
// Code Client
|
// Code Client
|
||||||
print '<tr><td>' . $langs->trans('CustomerCode');
|
print '<tr><td>' . $langs->trans('CustomerCode');
|
||||||
if (! empty($array_query['cust_code'])) {
|
if (! empty($array_query['cust_code'])) {
|
||||||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||||
}
|
}
|
||||||
print '</td><td><input type="text" name="cust_code" value="' . $array_query['cust_code'] . '"/></td><td>' . "\n";
|
print '</td><td><input type="text" name="cust_code" value="' . $array_query['cust_code'] . '"/></td><td>' . "\n";
|
||||||
print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help');
|
print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help');
|
||||||
print '</td></tr>' . "\n";
|
print '</td></tr>' . "\n";
|
||||||
|
|
||||||
// Address Client
|
// Address Client
|
||||||
print '<tr><td>' . $langs->trans('Address');
|
print '<tr><td>' . $langs->trans('Address');
|
||||||
if (! empty($array_query['cust_adress'])) {
|
if (! empty($array_query['cust_adress'])) {
|
||||||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||||
}
|
}
|
||||||
print '</td><td><input type="text" name="cust_adress" value="' . $array_query['cust_adress'] . '"/></td><td>' . "\n";
|
print '</td><td><input type="text" name="cust_adress" value="' . $array_query['cust_adress'] . '"/></td><td>' . "\n";
|
||||||
print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help');
|
print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help');
|
||||||
print '</td></tr>' . "\n";
|
print '</td></tr>' . "\n";
|
||||||
|
|
||||||
// Zip Client
|
// Zip Client
|
||||||
print '<tr><td>' . $langs->trans('Zip');
|
print '<tr><td>' . $langs->trans('Zip');
|
||||||
if (! empty($array_query['cust_zip'])) {
|
if (! empty($array_query['cust_zip'])) {
|
||||||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||||
}
|
}
|
||||||
print '</td><td><input type="text" name="cust_zip" value="' . $array_query['cust_zip'] . '"/></td><td>' . "\n";
|
print '</td><td><input type="text" name="cust_zip" value="' . $array_query['cust_zip'] . '"/></td><td>' . "\n";
|
||||||
print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help');
|
print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help');
|
||||||
print '</td></tr>' . "\n";
|
print '</td></tr>' . "\n";
|
||||||
|
|
||||||
// City Client
|
// City Client
|
||||||
print '<tr><td>' . $langs->trans('Town');
|
print '<tr><td>' . $langs->trans('Town');
|
||||||
if (! empty($array_query['cust_city'])) {
|
if (! empty($array_query['cust_city'])) {
|
||||||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||||
}
|
}
|
||||||
print '</td><td><input type="text" name="cust_city" value="' . $array_query['cust_city'] . '"/></td><td>' . "\n";
|
print '</td><td><input type="text" name="cust_city" value="' . $array_query['cust_city'] . '"/></td><td>' . "\n";
|
||||||
print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help');
|
print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help');
|
||||||
print '</td></tr>' . "\n";
|
print '</td></tr>' . "\n";
|
||||||
|
|
||||||
// Customer Country
|
// Customer Country
|
||||||
print '<tr><td>' . $langs->trans("Country");
|
print '<tr><td>' . $langs->trans("Country");
|
||||||
if (count($array_query['cust_country']) > 0) {
|
if (count($array_query['cust_country']) > 0) {
|
||||||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||||
}
|
}
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
print $formadvtargetemaling->multiselectCountry('cust_country', $array_query['cust_country']);
|
print $formadvtargetemaling->multiselectCountry('cust_country', $array_query['cust_country']);
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
print '</td></tr>' . "\n";
|
print '</td></tr>' . "\n";
|
||||||
|
|
||||||
// State Customer
|
// State Customer
|
||||||
print '<tr><td>' . $langs->trans('Status') . ' ' . $langs->trans('ThirdParty');
|
print '<tr><td>' . $langs->trans('Status') . ' ' . $langs->trans('ThirdParty');
|
||||||
if (count($array_query['cust_status']) > 0) {
|
if (count($array_query['cust_status']) > 0) {
|
||||||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||||
}
|
}
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print $formadvtargetemaling->advMultiselectarray(
|
print $formadvtargetemaling->advMultiselectarray(
|
||||||
'cust_status', array (
|
'cust_status', array (
|
||||||
'0' => $langs->trans('ActivityCeased'),
|
'0' => $langs->trans('ActivityCeased'),
|
||||||
'1' => $langs->trans('InActivity')
|
'1' => $langs->trans('InActivity')
|
||||||
),
|
),
|
||||||
$array_query['cust_status']
|
$array_query['cust_status']
|
||||||
);
|
);
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
print '</td></tr>' . "\n";
|
print '</td></tr>' . "\n";
|
||||||
|
|
||||||
// Mother Company
|
// Mother Company
|
||||||
print '<tr><td>' . $langs->trans("Maison mère");
|
print '<tr><td>' . $langs->trans("Maison mère");
|
||||||
if (! empty($array_query['cust_mothercompany'])) {
|
if (! empty($array_query['cust_mothercompany'])) {
|
||||||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||||
}
|
}
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
print '<input type="text" name="cust_mothercompany" value="' . $array_query['cust_mothercompany'] . '"/>';
|
print '<input type="text" name="cust_mothercompany" value="' . $array_query['cust_mothercompany'] . '"/>';
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help');
|
print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help');
|
||||||
print '</td></tr>' . "\n";
|
print '</td></tr>' . "\n";
|
||||||
|
|
||||||
// Prospect/Customer
|
// Prospect/Customer
|
||||||
$selected = $array_query['cust_typecust'];
|
$selected = $array_query['cust_typecust'];
|
||||||
print '<tr><td>' . $langs->trans('ProspectCustomer') . ' ' . $langs->trans('ThirdParty');
|
print '<tr><td>' . $langs->trans('ProspectCustomer') . ' ' . $langs->trans('ThirdParty');
|
||||||
if (count($array_query['cust_typecust']) > 0) {
|
if (count($array_query['cust_typecust']) > 0) {
|
||||||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||||
}
|
}
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
$options_array = array (
|
$options_array = array (
|
||||||
2 => $langs->trans('Prospect'),
|
2 => $langs->trans('Prospect'),
|
||||||
3 => $langs->trans('ProspectCustomer'),
|
3 => $langs->trans('ProspectCustomer'),
|
||||||
1 => $langs->trans('Customer'),
|
1 => $langs->trans('Customer'),
|
||||||
0 => $langs->trans('NorProspectNorCustomer')
|
0 => $langs->trans('NorProspectNorCustomer')
|
||||||
);
|
);
|
||||||
print $formadvtargetemaling->advMultiselectarray('cust_typecust', $options_array, $array_query['cust_typecust']);
|
print $formadvtargetemaling->advMultiselectarray('cust_typecust', $options_array, $array_query['cust_typecust']);
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
print '</td></tr>' . "\n";
|
print '</td></tr>' . "\n";
|
||||||
|
|
||||||
// Prospection status
|
// Prospection status
|
||||||
print '<tr><td>' . $langs->trans('ProspectLevel');
|
print '<tr><td>' . $langs->trans('ProspectLevel');
|
||||||
if (count($array_query['cust_prospect_status']) > 0) {
|
if (count($array_query['cust_prospect_status']) > 0) {
|
||||||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||||
}
|
}
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print $formadvtargetemaling->multiselectProspectionStatus($array_query['cust_prospect_status'], 'cust_prospect_status', 1);
|
print $formadvtargetemaling->multiselectProspectionStatus($array_query['cust_prospect_status'], 'cust_prospect_status', 1);
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
print '</td></tr>' . "\n";
|
print '</td></tr>' . "\n";
|
||||||
|
|
||||||
// Prospection comm status
|
// Prospection comm status
|
||||||
print '<tr><td>' . $langs->trans('StatusProsp');
|
print '<tr><td>' . $langs->trans('StatusProsp');
|
||||||
if (count($array_query['cust_comm_status']) > 0) {
|
if (count($array_query['cust_comm_status']) > 0) {
|
||||||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||||
}
|
}
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print $formadvtargetemaling->advMultiselectarray('cust_comm_status', $advTarget->type_statuscommprospect, $array_query['cust_comm_status']);
|
print $formadvtargetemaling->advMultiselectarray('cust_comm_status', $advTarget->type_statuscommprospect, $array_query['cust_comm_status']);
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
print '</td></tr>' . "\n";
|
print '</td></tr>' . "\n";
|
||||||
|
|
||||||
// Customer Type
|
// Customer Type
|
||||||
print '<tr><td>' . $langs->trans("ThirdPartyType");
|
print '<tr><td>' . $langs->trans("ThirdPartyType");
|
||||||
if (count($array_query['cust_typeent']) > 0) {
|
if (count($array_query['cust_typeent']) > 0) {
|
||||||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||||
}
|
}
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
print $formadvtargetemaling->advMultiselectarray('cust_typeent', $formcompany->typent_array(0, " AND id <> 0"), $array_query['cust_typeent']);
|
print $formadvtargetemaling->advMultiselectarray('cust_typeent', $formcompany->typent_array(0, " AND id <> 0"), $array_query['cust_typeent']);
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
print '</td></tr>' . "\n";
|
print '</td></tr>' . "\n";
|
||||||
|
|
||||||
// Staff number
|
// Staff number
|
||||||
print '<td>' . $langs->trans("Staff");
|
print '<td>' . $langs->trans("Staff");
|
||||||
if (count($array_query['cust_effectif_id']) > 0) {
|
if (count($array_query['cust_effectif_id']) > 0) {
|
||||||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||||
}
|
}
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print $formadvtargetemaling->advMultiselectarray("cust_effectif_id", $formcompany->effectif_array(0, " AND id <> 0"), $array_query['cust_effectif_id']);
|
print $formadvtargetemaling->advMultiselectarray("cust_effectif_id", $formcompany->effectif_array(0, " AND id <> 0"), $array_query['cust_effectif_id']);
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
print '</td></tr>' . "\n";
|
print '</td></tr>' . "\n";
|
||||||
|
|
||||||
// Sales manager
|
// Sales manager
|
||||||
print '<tr><td>' . $langs->trans("SalesRepresentatives");
|
print '<tr><td>' . $langs->trans("SalesRepresentatives");
|
||||||
if (count($array_query['cust_saleman']) > 0) {
|
if (count($array_query['cust_saleman']) > 0) {
|
||||||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||||
}
|
}
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
print $formadvtargetemaling->multiselectselectSalesRepresentatives('cust_saleman', $array_query['cust_saleman'], $user);
|
print $formadvtargetemaling->multiselectselectSalesRepresentatives('cust_saleman', $array_query['cust_saleman'], $user);
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
print '</td></tr>' . "\n";
|
print '</td></tr>' . "\n";
|
||||||
|
|
||||||
// Customer Default Langauge
|
// Customer Default Langauge
|
||||||
if (! empty($conf->global->MAIN_MULTILANGS)) {
|
if (! empty($conf->global->MAIN_MULTILANGS)) {
|
||||||
print '<tr><td>' . $langs->trans("DefaultLang");
|
print '<tr><td>' . $langs->trans("DefaultLang");
|
||||||
if (count($array_query['cust_language']) > 0) {
|
if (count($array_query['cust_language']) > 0) {
|
||||||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||||
@@ -244,9 +244,9 @@ print '<script type="text/javascript" language="javascript">
|
|||||||
print $formadvtargetemaling->multiselectselectLanguage('cust_language', $array_query['cust_language']);
|
print $formadvtargetemaling->multiselectselectLanguage('cust_language', $array_query['cust_language']);
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
print '</td></tr>' . "\n";
|
print '</td></tr>' . "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
|
if (! empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
|
||||||
// Customer Categories
|
// Customer Categories
|
||||||
print '<tr><td>' . $langs->trans("CustomersCategoryShort");
|
print '<tr><td>' . $langs->trans("CustomersCategoryShort");
|
||||||
if (count($array_query['cust_categ']) > 0) {
|
if (count($array_query['cust_categ']) > 0) {
|
||||||
@@ -256,10 +256,10 @@ print '<script type="text/javascript" language="javascript">
|
|||||||
print $formadvtargetemaling->multiselectCustomerCategories('cust_categ', $array_query['cust_categ']);
|
print $formadvtargetemaling->multiselectCustomerCategories('cust_categ', $array_query['cust_categ']);
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
print '</td></tr>' . "\n";
|
print '</td></tr>' . "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Standard Extrafield feature
|
// Standard Extrafield feature
|
||||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) {
|
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) {
|
||||||
$elementtype = Societe::$table_element;
|
$elementtype = Societe::$table_element;
|
||||||
// fetch optionals attributes and labels
|
// fetch optionals attributes and labels
|
||||||
dol_include_once('/core/class/extrafields.class.php');
|
dol_include_once('/core/class/extrafields.class.php');
|
||||||
@@ -322,7 +322,7 @@ print '<script type="text/javascript" language="javascript">
|
|||||||
print '</td></tr>' . "\n";
|
print '</td></tr>' . "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$std_soc = new Societe($db);
|
$std_soc = new Societe($db);
|
||||||
$action_search = 'query';
|
$action_search = 'query';
|
||||||
|
|
||||||
@@ -338,68 +338,68 @@ print '<script type="text/javascript" language="javascript">
|
|||||||
// Other attributes
|
// Other attributes
|
||||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $std_soc, $action_search);
|
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $std_soc, $action_search);
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
}
|
}
|
||||||
|
|
||||||
// State Contact
|
// State Contact
|
||||||
print '<tr><td>' . $langs->trans('Status') . ' ' . $langs->trans('Contact');
|
print '<tr><td>' . $langs->trans('Status') . ' ' . $langs->trans('Contact');
|
||||||
if (count($array_query['contact_status']) > 0) {
|
if (count($array_query['contact_status']) > 0) {
|
||||||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||||
}
|
}
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print $formadvtargetemaling->advMultiselectarray(
|
print $formadvtargetemaling->advMultiselectarray(
|
||||||
'contact_status',
|
'contact_status',
|
||||||
array (
|
array (
|
||||||
'0' => $langs->trans('ActivityCeased'),
|
'0' => $langs->trans('ActivityCeased'),
|
||||||
'1' => $langs->trans('InActivity')
|
'1' => $langs->trans('InActivity')
|
||||||
),
|
),
|
||||||
$array_query['contact_status']
|
$array_query['contact_status']
|
||||||
);
|
);
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
print $form->textwithpicto('', $langs->trans("AdvTgtContactHelp"), 1, 'help');
|
print $form->textwithpicto('', $langs->trans("AdvTgtContactHelp"), 1, 'help');
|
||||||
print '</td></tr>' . "\n";
|
print '</td></tr>' . "\n";
|
||||||
|
|
||||||
// Civility
|
// Civility
|
||||||
print '<tr><td width="15%">' . $langs->trans("UserTitle");
|
print '<tr><td width="15%">' . $langs->trans("UserTitle");
|
||||||
if (count($array_query['contact_civility']) > 0) {
|
if (count($array_query['contact_civility']) > 0) {
|
||||||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||||
}
|
}
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print $formadvtargetemaling->multiselectCivility('contact_civility', $array_query['contact_civility']);
|
print $formadvtargetemaling->multiselectCivility('contact_civility', $array_query['contact_civility']);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// contact name
|
// contact name
|
||||||
print '<tr><td>' . $langs->trans('Contact') . ' ' . $langs->trans('Lastname');
|
print '<tr><td>' . $langs->trans('Contact') . ' ' . $langs->trans('Lastname');
|
||||||
if (! empty($array_query['contact_lastname'])) {
|
if (! empty($array_query['contact_lastname'])) {
|
||||||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||||
}
|
}
|
||||||
print '</td><td><input type="text" name="contact_lastname" value="' . $array_query['contact_lastname'] . '"/></td><td>' . "\n";
|
print '</td><td><input type="text" name="contact_lastname" value="' . $array_query['contact_lastname'] . '"/></td><td>' . "\n";
|
||||||
print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help');
|
print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help');
|
||||||
print '</td></tr>' . "\n";
|
print '</td></tr>' . "\n";
|
||||||
print '<tr><td>' . $langs->trans('Contact') . ' ' . $langs->trans('Firstname');
|
print '<tr><td>' . $langs->trans('Contact') . ' ' . $langs->trans('Firstname');
|
||||||
if (! empty($array_query['contact_firstname'])) {
|
if (! empty($array_query['contact_firstname'])) {
|
||||||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||||
}
|
}
|
||||||
print '</td><td><input type="text" name="contact_firstname" value="' . $array_query['contact_firstname'] . '"/></td><td>' . "\n";
|
print '</td><td><input type="text" name="contact_firstname" value="' . $array_query['contact_firstname'] . '"/></td><td>' . "\n";
|
||||||
print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help');
|
print $form->textwithpicto('', $langs->trans("AdvTgtSearchTextHelp"), 1, 'help');
|
||||||
print '</td></tr>' . "\n";
|
print '</td></tr>' . "\n";
|
||||||
|
|
||||||
// Contact Country
|
// Contact Country
|
||||||
print '<tr><td>' . $langs->trans('Contact') . ' ' . $langs->trans("Country");
|
print '<tr><td>' . $langs->trans('Contact') . ' ' . $langs->trans("Country");
|
||||||
if (count($array_query['contact_country']) > 0) {
|
if (count($array_query['contact_country']) > 0) {
|
||||||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||||
}
|
}
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
print $formadvtargetemaling->multiselectCountry('contact_country', $array_query['contact_country']);
|
print $formadvtargetemaling->multiselectCountry('contact_country', $array_query['contact_country']);
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
print '</td></tr>' . "\n";
|
print '</td></tr>' . "\n";
|
||||||
|
|
||||||
// Never send mass mailing
|
// Never send mass mailing
|
||||||
print '<tr><td>' . $langs->trans('Contact') . ' ' . $langs->trans("No_Email");
|
print '<tr><td>' . $langs->trans('Contact') . ' ' . $langs->trans("No_Email");
|
||||||
if (! empty($array_query['contact_no_email'])) {
|
if (! empty($array_query['contact_no_email'])) {
|
||||||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||||
}
|
}
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
print $form->selectarray(
|
print $form->selectarray(
|
||||||
'contact_no_email',
|
'contact_no_email',
|
||||||
array (
|
array (
|
||||||
'' => '',
|
'' => '',
|
||||||
@@ -407,41 +407,41 @@ print '<script type="text/javascript" language="javascript">
|
|||||||
'0' => $langs->trans('No')
|
'0' => $langs->trans('No')
|
||||||
),
|
),
|
||||||
$array_query['contact_no_email']
|
$array_query['contact_no_email']
|
||||||
);
|
);
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
print '</td></tr>' . "\n";
|
print '</td></tr>' . "\n";
|
||||||
|
|
||||||
// Contact Date Create
|
// Contact Date Create
|
||||||
print '<tr><td>' . $langs->trans('Contact') . ' ' . $langs->trans("DateCreation");
|
print '<tr><td>' . $langs->trans('Contact') . ' ' . $langs->trans("DateCreation");
|
||||||
if (! empty($array_query['contact_create_st_dt'])) {
|
if (! empty($array_query['contact_create_st_dt'])) {
|
||||||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||||
}
|
}
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
print '<table class="nobordernopadding"><tr>';
|
print '<table class="nobordernopadding"><tr>';
|
||||||
print '<td>' . $langs->trans("AdvTgtStartDt") . '</td><td>';
|
print '<td>' . $langs->trans("AdvTgtStartDt") . '</td><td>';
|
||||||
print $form->selectDate($array_query['contact_create_st_dt'], 'contact_create_st_dt', 0, 0, 1, 'find_customer', 1, 1);
|
print $form->selectDate($array_query['contact_create_st_dt'], 'contact_create_st_dt', 0, 0, 1, 'find_customer', 1, 1);
|
||||||
print '</td><td>' . $langs->trans("AdvTgtEndDt") . '</td><td>';
|
print '</td><td>' . $langs->trans("AdvTgtEndDt") . '</td><td>';
|
||||||
print $form->selectDate($array_query['contact_create_end_dt'], 'contact_create_end_dt', 0, 0, 1, 'find_customer', 1, 1);
|
print $form->selectDate($array_query['contact_create_end_dt'], 'contact_create_end_dt', 0, 0, 1, 'find_customer', 1, 1);
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
print '</td></tr>' . "\n";
|
print '</td></tr>' . "\n";
|
||||||
|
|
||||||
// Contact update Create
|
// Contact update Create
|
||||||
print '<tr><td>' . $langs->trans('Contact') . ' ' . $langs->trans("DateLastModification");
|
print '<tr><td>' . $langs->trans('Contact') . ' ' . $langs->trans("DateLastModification");
|
||||||
if (! empty($array_query['contact_update_st_dt'])) {
|
if (! empty($array_query['contact_update_st_dt'])) {
|
||||||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||||
}
|
}
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
print '<table class="nobordernopadding"><tr>';
|
print '<table class="nobordernopadding"><tr>';
|
||||||
print '<td>' . $langs->trans("AdvTgtStartDt") . '</td><td>';
|
print '<td>' . $langs->trans("AdvTgtStartDt") . '</td><td>';
|
||||||
print $form->selectDate($array_query['contact_update_st_dt'], 'contact_update_st_dt', 0, 0, 1, 'find_customer', 1, 1);
|
print $form->selectDate($array_query['contact_update_st_dt'], 'contact_update_st_dt', 0, 0, 1, 'find_customer', 1, 1);
|
||||||
print '</td><td>' . $langs->trans("AdvTgtEndDt") . '</td><td>';
|
print '</td><td>' . $langs->trans("AdvTgtEndDt") . '</td><td>';
|
||||||
print $form->selectDate($array_query['contact_update_end_dt'], 'contact_update_end_dt', 0, 0, 1, 'find_customer', 1, 1);
|
print $form->selectDate($array_query['contact_update_end_dt'], 'contact_update_end_dt', 0, 0, 1, 'find_customer', 1, 1);
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
print '</td></tr>' . "\n";
|
print '</td></tr>' . "\n";
|
||||||
|
|
||||||
if (! empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
|
if (! empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
|
||||||
// Customer Categories
|
// Customer Categories
|
||||||
print '<tr><td>' . $langs->trans("ContactCategoriesShort");
|
print '<tr><td>' . $langs->trans("ContactCategoriesShort");
|
||||||
if (count($array_query['contact_categ']) > 0) {
|
if (count($array_query['contact_categ']) > 0) {
|
||||||
@@ -451,10 +451,10 @@ print '<script type="text/javascript" language="javascript">
|
|||||||
print $formadvtargetemaling->multiselectContactCategories('contact_categ', $array_query['contact_categ']);
|
print $formadvtargetemaling->multiselectContactCategories('contact_categ', $array_query['contact_categ']);
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
print '</td></tr>' . "\n";
|
print '</td></tr>' . "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Standard Extrafield feature
|
// Standard Extrafield feature
|
||||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) {
|
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) {
|
||||||
$elementype=Contact::$table_element;
|
$elementype=Contact::$table_element;
|
||||||
// fetch optionals attributes and labels
|
// fetch optionals attributes and labels
|
||||||
dol_include_once('/core/class/extrafields.class.php');
|
dol_include_once('/core/class/extrafields.class.php');
|
||||||
@@ -464,8 +464,7 @@ print '<script type="text/javascript" language="javascript">
|
|||||||
if($value == 'radio')$value = 'select';
|
if($value == 'radio')$value = 'select';
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($extrafields->attributes[$elementtype]['label'] as $key => $val)
|
foreach ($extrafields->attributes[$elementtype]['label'] as $key => $val) {
|
||||||
{
|
|
||||||
print '<tr><td>' . $extrafields->attributes[$elementtype]['label'][$key];
|
print '<tr><td>' . $extrafields->attributes[$elementtype]['label'][$key];
|
||||||
if ($array_query['options_' . $key . '_cnct'] != '' || (is_array($array_query['options_' . $key . '_cnct']) && count($array_query['options_' . $key . '_cnct']) > 0)) {
|
if ($array_query['options_' . $key . '_cnct'] != '' || (is_array($array_query['options_' . $key . '_cnct']) && count($array_query['options_' . $key . '_cnct']) > 0)) {
|
||||||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||||
@@ -486,7 +485,6 @@ print '<script type="text/javascript" language="javascript">
|
|||||||
print '</td><td>' . $langs->trans("AdvTgtEndDt") . '</td><td>';
|
print '</td><td>' . $langs->trans("AdvTgtEndDt") . '</td><td>';
|
||||||
print $form->selectDate('', 'options_' . $key . '_end_dt' . '_cnct');
|
print $form->selectDate('', 'options_' . $key . '_end_dt' . '_cnct');
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
print $form->textwithpicto('', $langs->trans("AdvTgtSearchDtHelp"), 1, 'help');
|
print $form->textwithpicto('', $langs->trans("AdvTgtSearchDtHelp"), 1, 'help');
|
||||||
} elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'boolean')) {
|
} elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'boolean')) {
|
||||||
@@ -515,31 +513,26 @@ print '<script type="text/javascript" language="javascript">
|
|||||||
print $extrafields->showInputField($key, $array_query['options_' . $key . '_cnct'], '', '_cnct');
|
print $extrafields->showInputField($key, $array_query['options_' . $key . '_cnct'], '', '_cnct');
|
||||||
}
|
}
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
}
|
}
|
||||||
print '</td></tr>' . "\n";
|
print '</td></tr>' . "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
print '<tr>' . "\n";
|
||||||
print '<tr>' . "\n";
|
print '<td colspan="3" class="right">' . "\n";
|
||||||
print '<td colspan="3" class="right">' . "\n";
|
print '<input type="button" name="addcontact" id="addcontact" value="' . $langs->trans('AdvTgtAddContact') . '" class="butAction"/>' . "\n";
|
||||||
|
print '</td>' . "\n";
|
||||||
print '<input type="button" name="addcontact" id="addcontact" value="' . $langs->trans('AdvTgtAddContact') . '" class="butAction"/>' . "\n";
|
print '</tr>' . "\n";
|
||||||
|
print '</table>' . "\n";
|
||||||
print '</td>' . "\n";
|
print '</form>' . "\n";
|
||||||
print '</tr>' . "\n";
|
print '</div>' . "\n";
|
||||||
print '</table>' . "\n";
|
print '<form action="' . $_SERVER['PHP_SELF'] . '?action=clear&id=' . $object->id . '" method="POST">';
|
||||||
print '</form>' . "\n";
|
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
||||||
print '</div>' . "\n";
|
print load_fiche_titre($langs->trans("ToClearAllRecipientsClickHere"));
|
||||||
|
print '<table class="noborder" width="100%">';
|
||||||
print '<form action="' . $_SERVER['PHP_SELF'] . '?action=clear&id=' . $object->id . '" method="POST">';
|
print '<tr class="liste_titre">';
|
||||||
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
print '<td class="liste_titre right"><input type="submit" class="button" value="' . $langs->trans("TargetsReset") . '"></td>';
|
||||||
print load_fiche_titre($langs->trans("ToClearAllRecipientsClickHere"));
|
print '</tr>';
|
||||||
print '<table class="noborder" width="100%">';
|
print '</table>';
|
||||||
print '<tr class="liste_titre">';
|
print '</form>';
|
||||||
print '<td class="liste_titre right"><input type="submit" class="button" value="' . $langs->trans("TargetsReset") . '"></td>';
|
print '<br>';
|
||||||
print '</tr>';
|
|
||||||
print '</table>';
|
|
||||||
print '</form>';
|
|
||||||
print '<br>';
|
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ $userstatic=new User($db);
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ($permission) {
|
if ($permission) {
|
||||||
?>
|
?>
|
||||||
<form class="tagtr liste_titre">
|
<form class="tagtr liste_titre">
|
||||||
<div class="tagtd liste_titre"><?php echo $langs->trans("NatureOfContact"); ?></div>
|
<div class="tagtd liste_titre"><?php echo $langs->trans("NatureOfContact"); ?></div>
|
||||||
<div class="tagtd liste_titre"><?php echo $langs->trans("ThirdParty"); ?></div>
|
<div class="tagtd liste_titre"><?php echo $langs->trans("ThirdParty"); ?></div>
|
||||||
@@ -141,7 +141,7 @@ if ($permission) {
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -155,11 +155,11 @@ if ($permission) {
|
|||||||
<div class="tagtd liste_titre"> </div>
|
<div class="tagtd liste_titre"> </div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$var = false;
|
$var = false;
|
||||||
|
|
||||||
$arrayofsource=array('internal','external'); // Show both link to user and thirdparties contacts
|
$arrayofsource=array('internal','external'); // Show both link to user and thirdparties contacts
|
||||||
foreach($arrayofsource as $source) {
|
foreach($arrayofsource as $source) {
|
||||||
$tmpobject=$object;
|
$tmpobject=$object;
|
||||||
if (($object->element == 'shipping'|| $object->element == 'reception') && is_object($objectsrc)) $tmpobject=$objectsrc;
|
if (($object->element == 'shipping'|| $object->element == 'reception') && is_object($objectsrc)) $tmpobject=$objectsrc;
|
||||||
|
|
||||||
@@ -211,8 +211,7 @@ if ($permission) {
|
|||||||
</div>
|
</div>
|
||||||
<div class="tagtd"><?php echo $tab[$i]['libelle']; ?></div>
|
<div class="tagtd"><?php echo $tab[$i]['libelle']; ?></div>
|
||||||
<div class="tagtd center">
|
<div class="tagtd center">
|
||||||
<?php //if ($object->statut >= 0) echo '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=swapstatut&ligne='.$tab[$i]['rowid'].'">'; ?>
|
<?php //if ($object->statut >= 0) echo '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=swapstatut&ligne='.$tab[$i]['rowid'].'">';
|
||||||
<?php
|
|
||||||
if ($tab[$i]['source']=='internal')
|
if ($tab[$i]['source']=='internal')
|
||||||
{
|
{
|
||||||
echo $userstatic->LibStatut($tab[$i]['statuscontact'], 3);
|
echo $userstatic->LibStatut($tab[$i]['statuscontact'], 3);
|
||||||
@@ -221,8 +220,7 @@ if ($permission) {
|
|||||||
{
|
{
|
||||||
echo $contactstatic->LibStatut($tab[$i]['statuscontact'], 3);
|
echo $contactstatic->LibStatut($tab[$i]['statuscontact'], 3);
|
||||||
}
|
}
|
||||||
?>
|
//if ($object->statut >= 0) echo '</a>'; ?>
|
||||||
<?php //if ($object->statut >= 0) echo '</a>'; ?>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="tagtd nowrap right">
|
<div class="tagtd nowrap right">
|
||||||
<?php if ($permission) { ?>
|
<?php if ($permission) { ?>
|
||||||
@@ -231,21 +229,16 @@ if ($permission) {
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php $i++; ?>
|
<?php $i++;
|
||||||
<?php
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|
||||||
</div>
|
print "</div>\n";
|
||||||
</div>
|
print "</div>\n";
|
||||||
<!-- TEMPLATE CONTACTS HOOK BEGIN HERE -->
|
print "<!-- TEMPLATE CONTACTS HOOK BEGIN HERE -->\n";
|
||||||
<?php
|
if (is_object($hookmanager)) {
|
||||||
if (is_object($hookmanager))
|
|
||||||
{
|
|
||||||
$hookmanager->initHooks(array('contacttpl'));
|
$hookmanager->initHooks(array('contacttpl'));
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
$reshook=$hookmanager->executeHooks('formContactTpl', $parameters, $object, $action);
|
$reshook=$hookmanager->executeHooks('formContactTpl', $parameters, $object, $action);
|
||||||
}
|
}
|
||||||
?>
|
print "<!-- END PHP TEMPLATE CONTACTS -->\n";
|
||||||
<!-- END PHP TEMPLATE CONTACTS -->
|
|
||||||
|
|||||||
@@ -63,19 +63,17 @@ if (! isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) $conf->global->THEME_ELDY_
|
|||||||
$colorbackhmenu1 = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_TOPMENU_BACK1)?$colorbackhmenu1:$conf->global->THEME_ELDY_TOPMENU_BACK1):(empty($user->conf->THEME_ELDY_TOPMENU_BACK1)?$colorbackhmenu1:$user->conf->THEME_ELDY_TOPMENU_BACK1);
|
$colorbackhmenu1 = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_TOPMENU_BACK1)?$colorbackhmenu1:$conf->global->THEME_ELDY_TOPMENU_BACK1):(empty($user->conf->THEME_ELDY_TOPMENU_BACK1)?$colorbackhmenu1:$user->conf->THEME_ELDY_TOPMENU_BACK1);
|
||||||
$colorbackhmenu1 = join(',', colorStringToArray($colorbackhmenu1)); // Normalize value to 'x,y,z'
|
$colorbackhmenu1 = join(',', colorStringToArray($colorbackhmenu1)); // Normalize value to 'x,y,z'
|
||||||
|
|
||||||
?>
|
print "<!-- BEGIN PHP TEMPLATE LOGIN.TPL.PHP -->\n";
|
||||||
<!-- BEGIN PHP TEMPLATE LOGIN.TPL.PHP -->
|
|
||||||
|
|
||||||
<?php
|
|
||||||
if (!empty($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND)) {
|
if (!empty($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND)) {
|
||||||
// For example $conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND = 'https://source.unsplash.com/random'
|
// For example $conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND = 'https://source.unsplash.com/random'
|
||||||
?>
|
?>
|
||||||
<body class="body bodylogin" style="background-image: url('<?php echo dol_escape_htmltag($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND); ?>'); background-repeat: no-repeat; background-position: center center; background-attachment: fixed; background-size: cover; background-color: #ffffff;">
|
<body class="body bodylogin" style="background-image: url('<?php echo dol_escape_htmltag($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND); ?>'); background-repeat: no-repeat; background-position: center center; background-attachment: fixed; background-size: cover; background-color: #ffffff;">
|
||||||
<?php
|
<?php
|
||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
<body class="body bodylogin"<?php print empty($conf->global->MAIN_LOGIN_BACKGROUND)?'':' style="background-size: cover; background-position: center center; background-attachment: fixed; background-repeat: no-repeat; background-image: url(\''.DOL_URL_ROOT.'/viewimage.php?cache=1&noalt=1&modulepart=mycompany&file=logos/'.urlencode($conf->global->MAIN_LOGIN_BACKGROUND).'\')"'; ?>>
|
<body class="body bodylogin"<?php print empty($conf->global->MAIN_LOGIN_BACKGROUND)?'':' style="background-size: cover; background-position: center center; background-attachment: fixed; background-repeat: no-repeat; background-image: url(\''.DOL_URL_ROOT.'/viewimage.php?cache=1&noalt=1&modulepart=mycompany&file=logos/'.urlencode($conf->global->MAIN_LOGIN_BACKGROUND).'\')"'; ?>>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@@ -179,7 +177,7 @@ if ($captcha) {
|
|||||||
if (preg_match('/\?/', $php_self)) $php_self.='&time='.dol_print_date(dol_now(), 'dayhourlog');
|
if (preg_match('/\?/', $php_self)) $php_self.='&time='.dol_print_date(dol_now(), 'dayhourlog');
|
||||||
else $php_self.='?time='.dol_print_date(dol_now(), 'dayhourlog');
|
else $php_self.='?time='.dol_print_date(dol_now(), 'dayhourlog');
|
||||||
// TODO: provide accessible captcha variants
|
// TODO: provide accessible captcha variants
|
||||||
?>
|
?>
|
||||||
<!-- Captcha -->
|
<!-- Captcha -->
|
||||||
<div class="trinputlogin">
|
<div class="trinputlogin">
|
||||||
<div class="tagtd nowraponall none center valignmiddle tdinputlogin">
|
<div class="tagtd nowraponall none center valignmiddle tdinputlogin">
|
||||||
@@ -279,11 +277,11 @@ if (isset($conf->file->main_authentication) && preg_match('/openid/', $conf->fil
|
|||||||
// Show error message if defined
|
// Show error message if defined
|
||||||
if (! empty($_SESSION['dol_loginmesg']))
|
if (! empty($_SESSION['dol_loginmesg']))
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<div class="center login_main_message"><div class="error">
|
<div class="center login_main_message"><div class="error">
|
||||||
<?php echo $_SESSION['dol_loginmesg']; ?>
|
<?php echo $_SESSION['dol_loginmesg']; ?>
|
||||||
</div></div>
|
</div></div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add commit strip
|
// Add commit strip
|
||||||
@@ -306,11 +304,11 @@ if (!empty($conf->global->MAIN_EASTER_EGG_COMMITSTRIP)) {
|
|||||||
|
|
||||||
<?php if ($main_home)
|
<?php if ($main_home)
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<div class="center login_main_home paddingtopbottom <?php echo empty($conf->global->MAIN_LOGIN_BACKGROUND)?'':' backgroundsemitransparent'; ?>" style="max-width: 70%">
|
<div class="center login_main_home paddingtopbottom <?php echo empty($conf->global->MAIN_LOGIN_BACKGROUND)?'':' backgroundsemitransparent'; ?>" style="max-width: 70%">
|
||||||
<?php echo $main_home; ?>
|
<?php echo $main_home; ?>
|
||||||
</div><br>
|
</div><br>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@@ -362,7 +360,7 @@ if (! empty($conf->google->enabled) && ! empty($conf->global->MAIN_GOOGLE_AD_CLI
|
|||||||
{
|
{
|
||||||
if (empty($conf->dol_use_jmobile))
|
if (empty($conf->dol_use_jmobile))
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<div class="center"><br>
|
<div class="center"><br>
|
||||||
<script type="text/javascript"><!--
|
<script type="text/javascript"><!--
|
||||||
google_ad_client = "<?php echo $conf->global->MAIN_GOOGLE_AD_CLIENT ?>";
|
google_ad_client = "<?php echo $conf->global->MAIN_GOOGLE_AD_CLIENT ?>";
|
||||||
@@ -375,14 +373,14 @@ if (! empty($conf->google->enabled) && ! empty($conf->global->MAIN_GOOGLE_AD_CLI
|
|||||||
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
|
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div> <!-- end of center -->
|
</div><!-- end of center -->
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -90,13 +90,11 @@ if (!empty($extrafields))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE objectline_create.tpl.php -->
|
print "<!-- BEGIN PHP TEMPLATE objectline_create.tpl.php -->\n";
|
||||||
<?php
|
|
||||||
$nolinesbefore=(count($this->lines) == 0 || $forcetoshowtitlelines);
|
$nolinesbefore=(count($this->lines) == 0 || $forcetoshowtitlelines);
|
||||||
if ($nolinesbefore) {
|
if ($nolinesbefore) {
|
||||||
?>
|
?>
|
||||||
<tr class="liste_titre<?php echo (($nolinesbefore || $object->element=='contrat')?'':' liste_titre_add_') ?> nodrag nodrop">
|
<tr class="liste_titre<?php echo (($nolinesbefore || $object->element=='contrat')?'':' liste_titre_add_') ?> nodrag nodrop">
|
||||||
<?php if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?>
|
<?php if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?>
|
||||||
<td class="linecolnum center"></td>
|
<td class="linecolnum center"></td>
|
||||||
@@ -156,28 +154,28 @@ if ($nolinesbefore) {
|
|||||||
?>
|
?>
|
||||||
<td class="linecoledit" colspan="<?php echo $colspan; ?>"> </td>
|
<td class="linecoledit" colspan="<?php echo $colspan; ?>"> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<tr class="pair nodrag nodrop nohoverpair<?php echo ($nolinesbefore || $object->element=='contrat')?'':' liste_titre_create'; ?>">
|
<tr class="pair nodrag nodrop nohoverpair<?php echo ($nolinesbefore || $object->element=='contrat')?'':' liste_titre_create'; ?>">
|
||||||
<?php
|
<?php
|
||||||
$coldisplay=0;
|
$coldisplay=0;
|
||||||
|
|
||||||
// Adds a line numbering column
|
// Adds a line numbering column
|
||||||
if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
|
if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
echo '<td class="nobottom linecolnum center"></td>';
|
echo '<td class="nobottom linecolnum center"></td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
?>
|
?>
|
||||||
<td class="nobottom linecoldescription minwidth500imp">
|
<td class="nobottom linecoldescription minwidth500imp">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$freelines = false;
|
$freelines = false;
|
||||||
if (empty($conf->global->MAIN_DISABLE_FREE_LINES))
|
if (empty($conf->global->MAIN_DISABLE_FREE_LINES))
|
||||||
{
|
{
|
||||||
$freelines = true;
|
$freelines = true;
|
||||||
$forceall=1; // We always force all type for free lines (module product or service means we use predefined product or service)
|
$forceall=1; // We always force all type for free lines (module product or service means we use predefined product or service)
|
||||||
if ($object->element == 'contrat')
|
if ($object->element == 'contrat')
|
||||||
@@ -216,11 +214,11 @@ if ($nolinesbefore) {
|
|||||||
echo $form->select_type_of_lines(isset($_POST["type"])?GETPOST("type", 'alpha', 2):-1, 'type', 1, 1, $forceall);
|
echo $form->select_type_of_lines(isset($_POST["type"])?GETPOST("type", 'alpha', 2):-1, 'type', 1, 1, $forceall);
|
||||||
|
|
||||||
echo '</span>';
|
echo '</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Predefined product/service
|
// Predefined product/service
|
||||||
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled))
|
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled))
|
||||||
{
|
{
|
||||||
if ($forceall >= 0 && $freelines) echo '<br>';
|
if ($forceall >= 0 && $freelines) echo '<br>';
|
||||||
echo '<span class="prod_entry_mode_predef">';
|
echo '<span class="prod_entry_mode_predef">';
|
||||||
echo '<label for="prod_entry_mode_predef">';
|
echo '<label for="prod_entry_mode_predef">';
|
||||||
@@ -317,47 +315,47 @@ if ($nolinesbefore) {
|
|||||||
}
|
}
|
||||||
echo '<input type="hidden" name="pbq" id="pbq" value="">';
|
echo '<input type="hidden" name="pbq" id="pbq" value="">';
|
||||||
echo '</span>';
|
echo '</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_object($hookmanager) && empty($senderissupplier))
|
if (is_object($hookmanager) && empty($senderissupplier))
|
||||||
{
|
{
|
||||||
$parameters=array('fk_parent_line'=>GETPOST('fk_parent_line', 'int'));
|
$parameters=array('fk_parent_line'=>GETPOST('fk_parent_line', 'int'));
|
||||||
$reshook=$hookmanager->executeHooks('formCreateProductOptions', $parameters, $object, $action);
|
$reshook=$hookmanager->executeHooks('formCreateProductOptions', $parameters, $object, $action);
|
||||||
if (!empty($hookmanager->resPrint)) {
|
if (!empty($hookmanager->resPrint)) {
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (is_object($hookmanager) && ! empty($senderissupplier))
|
if (is_object($hookmanager) && ! empty($senderissupplier))
|
||||||
{
|
{
|
||||||
$parameters=array('htmlname'=>'addproduct');
|
$parameters=array('htmlname'=>'addproduct');
|
||||||
$reshook=$hookmanager->executeHooks('formCreateProductSupplierOptions', $parameters, $object, $action);
|
$reshook=$hookmanager->executeHooks('formCreateProductSupplierOptions', $parameters, $object, $action);
|
||||||
if (!empty($hookmanager->resPrint)) {
|
if (!empty($hookmanager->resPrint)) {
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) {
|
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) {
|
||||||
if (!empty($conf->variants->enabled)) {
|
if (!empty($conf->variants->enabled)) {
|
||||||
echo '<div id="attributes_box"></div>';
|
echo '<div id="attributes_box"></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<br>';
|
echo '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Editor wysiwyg
|
// Editor wysiwyg
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||||
$nbrows=ROWS_2;
|
$nbrows=ROWS_2;
|
||||||
$enabled=(! empty($conf->global->FCKEDITOR_ENABLE_DETAILS)?$conf->global->FCKEDITOR_ENABLE_DETAILS:0);
|
$enabled=(! empty($conf->global->FCKEDITOR_ENABLE_DETAILS)?$conf->global->FCKEDITOR_ENABLE_DETAILS:0);
|
||||||
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
|
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
|
||||||
$toolbarname='dolibarr_details';
|
$toolbarname='dolibarr_details';
|
||||||
if (! empty($conf->global->FCKEDITOR_ENABLE_DETAILS_FULL)) $toolbarname='dolibarr_notes';
|
if (! empty($conf->global->FCKEDITOR_ENABLE_DETAILS_FULL)) $toolbarname='dolibarr_notes';
|
||||||
$doleditor=new DolEditor('dp_desc', GETPOST('dp_desc', 'none'), '', (empty($conf->global->MAIN_DOLEDITOR_HEIGHT)?100:$conf->global->MAIN_DOLEDITOR_HEIGHT), $toolbarname, '', false, true, $enabled, $nbrows, '98%');
|
$doleditor=new DolEditor('dp_desc', GETPOST('dp_desc', 'none'), '', (empty($conf->global->MAIN_DOLEDITOR_HEIGHT)?100:$conf->global->MAIN_DOLEDITOR_HEIGHT), $toolbarname, '', false, true, $enabled, $nbrows, '98%');
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
|
|
||||||
// Show autofill date for recurring invoices
|
// Show autofill date for recurring invoices
|
||||||
if (! empty($conf->service->enabled) && $object->element == 'facturerec')
|
if (! empty($conf->service->enabled) && $object->element == 'facturerec')
|
||||||
{
|
{
|
||||||
echo '<div class="divlinefordates"><br>';
|
echo '<div class="divlinefordates"><br>';
|
||||||
echo $langs->trans('AutoFillDateFrom').' ';
|
echo $langs->trans('AutoFillDateFrom').' ';
|
||||||
echo $form->selectyesno('date_start_fill', $line->date_start_fill, 1);
|
echo $form->selectyesno('date_start_fill', $line->date_start_fill, 1);
|
||||||
@@ -365,75 +363,75 @@ if ($nolinesbefore) {
|
|||||||
echo $langs->trans('AutoFillDateTo').' ';
|
echo $langs->trans('AutoFillDateTo').' ';
|
||||||
echo $form->selectyesno('date_end_fill', $line->date_end_fill, 1);
|
echo $form->selectyesno('date_end_fill', $line->date_end_fill, 1);
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
}
|
}
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
|
|
||||||
if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') // We must have same test in printObjectLines
|
if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') // We must have same test in printObjectLines
|
||||||
{
|
{
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
?>
|
?>
|
||||||
<td class="nobottom linecolresupplier"><input id="fourn_ref" name="fourn_ref" class="flat minwidth50 maxwidth150" value="<?php echo (isset($_POST["fourn_ref"])?GETPOST("fourn_ref", 'alpha', 2):''); ?>"></td>
|
<td class="nobottom linecolresupplier"><input id="fourn_ref" name="fourn_ref" class="flat minwidth50 maxwidth150" value="<?php echo (isset($_POST["fourn_ref"])?GETPOST("fourn_ref", 'alpha', 2):''); ?>"></td>
|
||||||
<?php } ?>
|
<?php }
|
||||||
|
|
||||||
<td class="nobottom linecolvat right"><?php
|
print '<td class="nobottom linecolvat right">';
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
if ($seller->tva_assuj == "0") echo '<input type="hidden" name="tva_tx" id="tva_tx" value="0">'.vatrate(0, true);
|
if ($seller->tva_assuj == "0") echo '<input type="hidden" name="tva_tx" id="tva_tx" value="0">'.vatrate(0, true);
|
||||||
else echo $form->load_tva('tva_tx', (isset($_POST["tva_tx"])?GETPOST("tva_tx", 'alpha', 2):-1), $seller, $buyer, 0, 0, '', false, 1);
|
else echo $form->load_tva('tva_tx', (isset($_POST["tva_tx"])?GETPOST("tva_tx", 'alpha', 2):-1), $seller, $buyer, 0, 0, '', false, 1);
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="nobottom linecoluht right"><?php $coldisplay++; ?>
|
<td class="nobottom linecoluht right"><?php $coldisplay++; ?>
|
||||||
<input type="text" size="5" name="price_ht" id="price_ht" class="flat right" value="<?php echo (isset($_POST["price_ht"])?GETPOST("price_ht", 'alpha', 2):''); ?>">
|
<input type="text" size="5" name="price_ht" id="price_ht" class="flat right" value="<?php echo (isset($_POST["price_ht"])?GETPOST("price_ht", 'alpha', 2):''); ?>">
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<?php if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) {
|
<?php if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) {
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
?>
|
?>
|
||||||
<td class="nobottom linecoluht_currency right">
|
<td class="nobottom linecoluht_currency right">
|
||||||
<input type="text" size="5" name="multicurrency_price_ht" id="multicurrency_price_ht" class="flat right" value="<?php echo (isset($_POST["multicurrency_price_ht"])?GETPOST("multicurrency_price_ht", 'alpha', 2):''); ?>">
|
<input type="text" size="5" name="multicurrency_price_ht" id="multicurrency_price_ht" class="flat right" value="<?php echo (isset($_POST["multicurrency_price_ht"])?GETPOST("multicurrency_price_ht", 'alpha', 2):''); ?>">
|
||||||
</td>
|
</td>
|
||||||
<?php } ?>
|
<?php }
|
||||||
|
|
||||||
<?php if (! empty($inputalsopricewithtax)) {
|
if (! empty($inputalsopricewithtax)) {
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
?>
|
?>
|
||||||
<td class="nobottom linecoluttc right">
|
<td class="nobottom linecoluttc right">
|
||||||
<input type="text" size="5" name="price_ttc" id="price_ttc" class="flat" value="<?php echo (isset($_POST["price_ttc"])?GETPOST("price_ttc", 'alpha', 2):''); ?>">
|
<input type="text" size="5" name="price_ttc" id="price_ttc" class="flat" value="<?php echo (isset($_POST["price_ttc"])?GETPOST("price_ttc", 'alpha', 2):''); ?>">
|
||||||
</td>
|
</td>
|
||||||
<?php }
|
<?php }
|
||||||
|
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
?>
|
?>
|
||||||
<td class="nobottom linecolqty right"><input type="text" size="2" name="qty" id="qty" class="flat right" value="<?php echo (isset($_POST["qty"])?GETPOST("qty", 'alpha', 2):1); ?>">
|
<td class="nobottom linecolqty right"><input type="text" size="2" name="qty" id="qty" class="flat right" value="<?php echo (isset($_POST["qty"])?GETPOST("qty", 'alpha', 2):1); ?>">
|
||||||
</td>
|
</td>
|
||||||
<?php
|
<?php
|
||||||
if($conf->global->PRODUCT_USE_UNITS)
|
if($conf->global->PRODUCT_USE_UNITS)
|
||||||
{
|
{
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
print '<td class="nobottom linecoluseunit left">';
|
print '<td class="nobottom linecoluseunit left">';
|
||||||
print $form->selectUnits($line->fk_unit, "units");
|
print $form->selectUnits($line->fk_unit, "units");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
$remise_percent = $buyer->remise_percent;
|
$remise_percent = $buyer->remise_percent;
|
||||||
if($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier')
|
if($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier')
|
||||||
{
|
{
|
||||||
$remise_percent = $seller->remise_supplier_percent;
|
$remise_percent = $seller->remise_supplier_percent;
|
||||||
}
|
}
|
||||||
|
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
?>
|
?>
|
||||||
<td class="nobottom nowrap linecoldiscount right"><input type="text" size="1" name="remise_percent" id="remise_percent" class="flat right" value="<?php echo (isset($_POST["remise_percent"])?GETPOST("remise_percent", 'alpha', 2):$remise_percent); ?>"><span class="hideonsmartphone">%</span></td>
|
<td class="nobottom nowrap linecoldiscount right"><input type="text" size="1" name="remise_percent" id="remise_percent" class="flat right" value="<?php echo (isset($_POST["remise_percent"])?GETPOST("remise_percent", 'alpha', 2):$remise_percent); ?>"><span class="hideonsmartphone">%</span></td>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ($this->situation_cycle_ref) {
|
if ($this->situation_cycle_ref) {
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
print '<td class="nobottom nowrap right"><input class="falt right" type="text" size="1" value="0" name="progress">%</td>';
|
print '<td class="nobottom nowrap right"><input class="falt right" type="text" size="1" value="0" name="progress">%</td>';
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($usemargins))
|
if (! empty($usemargins))
|
||||||
{
|
{
|
||||||
if (!empty($user->rights->margins->creer)) {
|
if (!empty($user->rights->margins->creer)) {
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
?>
|
?>
|
||||||
@@ -457,10 +455,10 @@ if ($nolinesbefore) {
|
|||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$coldisplay+=$colspan;
|
$coldisplay+=$colspan;
|
||||||
?>
|
?>
|
||||||
<td class="nobottom linecoledit center valignmiddle" colspan="<?php echo $colspan; ?>">
|
<td class="nobottom linecoledit center valignmiddle" colspan="<?php echo $colspan; ?>">
|
||||||
<input type="submit" class="button" value="<?php echo $langs->trans('Add'); ?>" name="addline" id="addline">
|
<input type="submit" class="button" value="<?php echo $langs->trans('Add'); ?>" name="addline" id="addline">
|
||||||
</td>
|
</td>
|
||||||
@@ -512,20 +510,16 @@ if ((! empty($conf->service->enabled) || ($object->element == 'contrat')) && $da
|
|||||||
print 'jQuery("#date_endmin").val("'.$conf->global->MAIN_DEFAULT_DATE_END_MIN.'");';
|
print 'jQuery("#date_endmin").val("'.$conf->global->MAIN_DEFAULT_DATE_END_MIN.'");';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</script>'
|
print '</script>';
|
||||||
?>
|
print '</td>';
|
||||||
</td>
|
print "</tr>\n";
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|
||||||
<script>
|
print "<script>\n";
|
||||||
|
|
||||||
<?php
|
|
||||||
if (! empty($usemargins) && $user->rights->margins->creer)
|
if (! empty($usemargins) && $user->rights->margins->creer)
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
|
|
||||||
/* Some js test when we click on button "Add" */
|
/* Some js test when we click on button "Add" */
|
||||||
jQuery(document).ready(function() {
|
jQuery(document).ready(function() {
|
||||||
@@ -590,7 +584,7 @@ if (! empty($usemargins) && $user->rights->margins->creer)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
@@ -54,20 +54,18 @@ $colspan = 3; // Col total ht + col edit + col delete
|
|||||||
if (! empty($inputalsopricewithtax)) $colspan++; // We add 1 if col total ttc
|
if (! empty($inputalsopricewithtax)) $colspan++; // We add 1 if col total ttc
|
||||||
if (in_array($object->element, array('propal','supplier_proposal','facture','facturerec','invoice','commande','order','order_supplier','invoice_supplier'))) $colspan++; // With this, there is a column move button
|
if (in_array($object->element, array('propal','supplier_proposal','facture','facturerec','invoice','commande','order','order_supplier','invoice_supplier'))) $colspan++; // With this, there is a column move button
|
||||||
if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) $colspan+=2;
|
if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) $colspan+=2;
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE objectline_edit.tpl.php -->
|
print "<!-- BEGIN PHP TEMPLATE objectline_edit.tpl.php -->\n";
|
||||||
|
|
||||||
<?php
|
|
||||||
$coldisplay=0;
|
$coldisplay=0;
|
||||||
?>
|
?>
|
||||||
<tr class="oddeven tredited">
|
<tr class="oddeven tredited">
|
||||||
<?php if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?>
|
<?php if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?>
|
||||||
<td class="linecolnum center"><?php $coldisplay++; ?><?php echo ($i+1); ?></td>
|
<td class="linecolnum center"><?php $coldisplay++; ?><?php echo ($i+1); ?></td>
|
||||||
<?php }
|
<?php }
|
||||||
|
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
?>
|
?>
|
||||||
<td>
|
<td>
|
||||||
<div id="line_<?php echo $line->id; ?>"></div>
|
<div id="line_<?php echo $line->id; ?>"></div>
|
||||||
|
|
||||||
@@ -168,8 +166,9 @@ $coldisplay=0;
|
|||||||
print '></td>';
|
print '></td>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<td class="right"><?php $coldisplay++; ?>
|
<td class="right">
|
||||||
<?php if (($line->info_bits & 2) != 2) {
|
<?php $coldisplay++;
|
||||||
|
if (($line->info_bits & 2) != 2) {
|
||||||
// I comment this because it shows info even when not required
|
// I comment this because it shows info even when not required
|
||||||
// for example always visible on invoice but must be visible only if stock module on and stock decrease option is on invoice validation and status is not validated
|
// for example always visible on invoice but must be visible only if stock module on and stock decrease option is on invoice validation and status is not validated
|
||||||
// must also not be output for most entities (proposal, intervention, ...)
|
// must also not be output for most entities (proposal, intervention, ...)
|
||||||
@@ -192,8 +191,9 @@ $coldisplay=0;
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<td class="nowrap right"><?php $coldisplay++; ?>
|
<td class="nowrap right">
|
||||||
<?php if (($line->info_bits & 2) != 2) {
|
<?php $coldisplay++;
|
||||||
|
if (($line->info_bits & 2) != 2) {
|
||||||
print '<input size="1" type="text" class="flat right" name="remise_percent" id="remise_percent" value="' . $line->remise_percent . '"';
|
print '<input size="1" type="text" class="flat right" name="remise_percent" id="remise_percent" value="' . $line->remise_percent . '"';
|
||||||
if ($line->fk_prev_id != null ) print ' readonly';
|
if ($line->fk_prev_id != null ) print ' readonly';
|
||||||
print '>%';
|
print '>%';
|
||||||
@@ -201,7 +201,7 @@ $coldisplay=0;
|
|||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
<?php
|
<?php
|
||||||
if ($this->situation_cycle_ref) {
|
if ($this->situation_cycle_ref) {
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
print '<td class="nowrap right linecolcycleref"><input class="right" type="text" size="1" value="' . $line->situation_percent . '" name="progress">%</td>';
|
print '<td class="nowrap right linecolcycleref"><input class="right" type="text" size="1" value="' . $line->situation_percent . '" name="progress">%</td>';
|
||||||
@@ -247,7 +247,7 @@ $coldisplay=0;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- colspan for this td because it replace total_ht+3 td for buttons+... -->
|
<!-- colspan for this td because it replace total_ht+3 td for buttons+... -->
|
||||||
<td class="center valignmiddle" colspan="<?php echo $colspan; ?>"><?php $coldisplay+=$colspan; ?>
|
<td class="center valignmiddle" colspan="<?php echo $colspan; ?>"><?php $coldisplay+=$colspan; ?>
|
||||||
|
|||||||
@@ -39,9 +39,9 @@ if (empty($object) || ! is_object($object))
|
|||||||
print "Error, template page can't be called as URL";
|
print "Error, template page can't be called as URL";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
<!-- BEGIN PHP TEMPLATE objectline_title.tpl.php -->
|
print "<!-- BEGIN PHP TEMPLATE objectline_title.tpl.php -->\n";
|
||||||
<?php
|
|
||||||
// Title line
|
// Title line
|
||||||
print "<thead>\n";
|
print "<thead>\n";
|
||||||
|
|
||||||
@@ -90,16 +90,19 @@ if ($usemargins && ! empty($conf->margin->enabled) && empty($user->societe_id))
|
|||||||
{
|
{
|
||||||
if (!empty($user->rights->margins->creer))
|
if (!empty($user->rights->margins->creer))
|
||||||
{
|
{
|
||||||
if ($conf->global->MARGIN_TYPE == "1")
|
if ($conf->global->MARGIN_TYPE == "1") {
|
||||||
print '<td class="linecolmargin1 margininfos right" style="width: 80px">'.$langs->trans('BuyingPrice').'</td>';
|
print '<td class="linecolmargin1 margininfos right" style="width: 80px">'.$langs->trans('BuyingPrice').'</td>';
|
||||||
else
|
} else {
|
||||||
print '<td class="linecolmargin1 margininfos right" style="width: 80px">'.$langs->trans('CostPrice').'</td>';
|
print '<td class="linecolmargin1 margininfos right" style="width: 80px">'.$langs->trans('CostPrice').'</td>';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES) && $user->rights->margins->liretous)
|
if (! empty($conf->global->DISPLAY_MARGIN_RATES) && $user->rights->margins->liretous) {
|
||||||
print '<td class="linecolmargin2 margininfos right" style="width: 50px">'.$langs->trans('MarginRate').'</td>';
|
print '<td class="linecolmargin2 margininfos right" style="width: 50px">'.$langs->trans('MarginRate').'</td>';
|
||||||
if (! empty($conf->global->DISPLAY_MARK_RATES) && $user->rights->margins->liretous)
|
}
|
||||||
|
if (! empty($conf->global->DISPLAY_MARK_RATES) && $user->rights->margins->liretous) {
|
||||||
print '<td class="linecolmargin2 margininfos right" style="width: 50px">'.$langs->trans('MarkRate').'</td>';
|
print '<td class="linecolmargin2 margininfos right" style="width: 50px">'.$langs->trans('MarkRate').'</td>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Total HT
|
// Total HT
|
||||||
@@ -126,6 +129,5 @@ if($action == 'selectlines')
|
|||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
print "</thead>\n";
|
print "</thead>\n";
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- END PHP TEMPLATE objectline_title.tpl.php -->
|
print "<!-- END PHP TEMPLATE objectline_title.tpl.php -->\n";
|
||||||
|
|||||||
@@ -64,19 +64,16 @@ $domData .= ' data-qty="'.$line->qty.'"';
|
|||||||
$domData .= ' data-product_type="'.$line->product_type.'"';
|
$domData .= ' data-product_type="'.$line->product_type.'"';
|
||||||
|
|
||||||
|
|
||||||
?>
|
$coldisplay=0; ?>
|
||||||
<?php $coldisplay=0; ?>
|
|
||||||
<!-- BEGIN PHP TEMPLATE objectline_view.tpl.php -->
|
<!-- BEGIN PHP TEMPLATE objectline_view.tpl.php -->
|
||||||
<tr id="row-<?php echo $line->id?>" class="drag drop oddeven" <?php echo $domData; ?> >
|
<tr id="row-<?php echo $line->id?>" class="drag drop oddeven" <?php echo $domData; ?> >
|
||||||
<?php if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?>
|
<?php if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?>
|
||||||
<td class="linecolnum center"><?php $coldisplay++; ?><?php echo ($i+1); ?></td>
|
<td class="linecolnum center"><?php $coldisplay++; ?><?php echo ($i+1); ?></td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<td class="linecoldescription minwidth300imp"><?php $coldisplay++; ?><div id="line_<?php echo $line->id; ?>"></div>
|
<td class="linecoldescription minwidth300imp"><?php $coldisplay++; ?><div id="line_<?php echo $line->id; ?>"></div>
|
||||||
<?php
|
<?php
|
||||||
if (($line->info_bits & 2) == 2) {
|
if (($line->info_bits & 2) == 2) {
|
||||||
?>
|
print '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$this->socid.'">';
|
||||||
<a href="<?php echo DOL_URL_ROOT.'/comm/remx.php?id='.$this->socid; ?>">
|
|
||||||
<?php
|
|
||||||
$txt='';
|
$txt='';
|
||||||
print img_object($langs->trans("ShowReduc"), 'reduc').' ';
|
print img_object($langs->trans("ShowReduc"), 'reduc').' ';
|
||||||
if ($line->description == '(DEPOSIT)') $txt=$langs->trans("Deposit");
|
if ($line->description == '(DEPOSIT)') $txt=$langs->trans("Deposit");
|
||||||
@@ -84,9 +81,7 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
|
|||||||
elseif ($line->description == '(EXCESS PAID)') $txt=$langs->trans("ExcessPaid");
|
elseif ($line->description == '(EXCESS PAID)') $txt=$langs->trans("ExcessPaid");
|
||||||
//else $txt=$langs->trans("Discount");
|
//else $txt=$langs->trans("Discount");
|
||||||
print $txt;
|
print $txt;
|
||||||
?>
|
print '</a>';
|
||||||
</a>
|
|
||||||
<?php
|
|
||||||
if ($line->description)
|
if ($line->description)
|
||||||
{
|
{
|
||||||
if ($line->description == '(CREDIT_NOTE)' && $line->fk_remise_except > 0)
|
if ($line->description == '(CREDIT_NOTE)' && $line->fk_remise_except > 0)
|
||||||
@@ -121,9 +116,9 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
|
|||||||
echo ($txt?' - ':'').dol_htmlentitiesbr($line->description);
|
echo ($txt?' - ':'').dol_htmlentitiesbr($line->description);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$format = $conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE?'dayhour':'day';
|
$format = $conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE?'dayhour':'day';
|
||||||
|
|
||||||
if ($line->fk_product > 0)
|
if ($line->fk_product > 0)
|
||||||
@@ -162,10 +157,10 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
|
|||||||
{
|
{
|
||||||
print (! empty($line->description) && $line->description!=$line->product_label)?'<br>'.dol_htmlentitiesbr($line->description):'';
|
print (! empty($line->description) && $line->description!=$line->product_label)?'<br>'.dol_htmlentitiesbr($line->description):'';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->rights->fournisseur->lire && $line->fk_fournprice > 0)
|
if ($user->rights->fournisseur->lire && $line->fk_fournprice > 0)
|
||||||
{
|
{
|
||||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
|
||||||
$productfourn = new ProductFournisseur($this->db);
|
$productfourn = new ProductFournisseur($this->db);
|
||||||
$productfourn->fetch_product_fournisseur_price($line->fk_fournprice);
|
$productfourn->fetch_product_fournisseur_price($line->fk_fournprice);
|
||||||
@@ -179,87 +174,80 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
|
|||||||
{
|
{
|
||||||
echo $productfourn->ref_supplier;
|
echo $productfourn->ref_supplier;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->accounting->enabled) && $line->fk_accounting_account > 0)
|
if (! empty($conf->accounting->enabled) && $line->fk_accounting_account > 0)
|
||||||
{
|
{
|
||||||
$accountingaccount=new AccountingAccount($this->db);
|
$accountingaccount=new AccountingAccount($this->db);
|
||||||
$accountingaccount->fetch($line->fk_accounting_account);
|
$accountingaccount->fetch($line->fk_accounting_account);
|
||||||
echo '<div class="clearboth"></div><br><span class="opacitymedium">' . $langs->trans('AccountingAffectation') . ' : </span>' . $accountingaccount->getNomUrl(0, 1, 1);
|
echo '<div class="clearboth"></div><br><span class="opacitymedium">' . $langs->trans('AccountingAffectation') . ' : </span>' . $accountingaccount->getNomUrl(0, 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
print '</td>';
|
||||||
</td>
|
if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') // We must have same test in printObjectLines
|
||||||
<?php
|
{
|
||||||
if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') // We must have same test in printObjectLines
|
print '<td class="linecolrefsupplier">';
|
||||||
{
|
|
||||||
?>
|
|
||||||
<td class="linecolrefsupplier"><?php
|
|
||||||
echo ($line->ref_fourn?$line->ref_fourn:$line->ref_supplier);
|
echo ($line->ref_fourn?$line->ref_fourn:$line->ref_supplier);
|
||||||
?></td>
|
print '</td>';
|
||||||
<?php
|
}
|
||||||
}
|
// VAT Rate
|
||||||
// VAT Rate
|
print '<td class="linecolvat nowrap right">';
|
||||||
?>
|
$coldisplay++;
|
||||||
<td class="linecolvat nowrap right"><?php $coldisplay++; ?><?php
|
$positiverates='';
|
||||||
$positiverates='';
|
if (price2num($line->tva_tx)) $positiverates.=($positiverates?'/':'').price2num($line->tva_tx);
|
||||||
if (price2num($line->tva_tx)) $positiverates.=($positiverates?'/':'').price2num($line->tva_tx);
|
if (price2num($line->total_localtax1)) $positiverates.=($positiverates?'/':'').price2num($line->localtax1_tx);
|
||||||
if (price2num($line->total_localtax1)) $positiverates.=($positiverates?'/':'').price2num($line->localtax1_tx);
|
if (price2num($line->total_localtax2)) $positiverates.=($positiverates?'/':'').price2num($line->localtax2_tx);
|
||||||
if (price2num($line->total_localtax2)) $positiverates.=($positiverates?'/':'').price2num($line->localtax2_tx);
|
if (empty($positiverates)) $positiverates='0';
|
||||||
if (empty($positiverates)) $positiverates='0';
|
echo vatrate($positiverates.($line->vat_src_code?' ('.$line->vat_src_code.')':''), '%', $line->info_bits);
|
||||||
echo vatrate($positiverates.($line->vat_src_code?' ('.$line->vat_src_code.')':''), '%', $line->info_bits);
|
//echo vatrate($line->tva_tx.($line->vat_src_code?(' ('.$line->vat_src_code.')'):''), '%', $line->info_bits);
|
||||||
//echo vatrate($line->tva_tx.($line->vat_src_code?(' ('.$line->vat_src_code.')'):''), '%', $line->info_bits);
|
?></td>
|
||||||
?></td>
|
|
||||||
|
|
||||||
<td class="linecoluht nowrap right"><?php $coldisplay++; ?><?php echo price($line->subprice); ?></td>
|
<td class="linecoluht nowrap right"><?php $coldisplay++; ?><?php echo price($line->subprice); ?></td>
|
||||||
|
|
||||||
<?php if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { ?>
|
<?php if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { ?>
|
||||||
<td class="linecoluht_currency nowrap right"><?php $coldisplay++; ?><?php echo price($line->multicurrency_subprice); ?></td>
|
<td class="linecoluht_currency nowrap right"><?php $coldisplay++; ?><?php echo price($line->multicurrency_subprice); ?></td>
|
||||||
<?php } ?>
|
<?php }
|
||||||
|
|
||||||
<?php if ($inputalsopricewithtax) { ?>
|
if ($inputalsopricewithtax) { ?>
|
||||||
<td class="linecoluttc nowrap right"><?php $coldisplay++; ?><?php echo (isset($line->pu_ttc)?price($line->pu_ttc):price($line->subprice)); ?></td>
|
<td class="linecoluttc nowrap right"><?php $coldisplay++; ?><?php echo (isset($line->pu_ttc)?price($line->pu_ttc):price($line->subprice)); ?></td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<td class="linecolqty nowrap right"><?php $coldisplay++; ?>
|
<td class="linecolqty nowrap right"><?php $coldisplay++; ?>
|
||||||
<?php
|
<?php
|
||||||
if ((($line->info_bits & 2) != 2) && $line->special_code != 3) {
|
if ((($line->info_bits & 2) != 2) && $line->special_code != 3) {
|
||||||
// I comment this because it shows info even when not required
|
// I comment this because it shows info even when not required
|
||||||
// for example always visible on invoice but must be visible only if stock module on and stock decrease option is on invoice validation and status is not validated
|
// for example always visible on invoice but must be visible only if stock module on and stock decrease option is on invoice validation and status is not validated
|
||||||
// must also not be output for most entities (proposal, intervention, ...)
|
// must also not be output for most entities (proposal, intervention, ...)
|
||||||
//if($line->qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." ";
|
//if($line->qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." ";
|
||||||
echo price($line->qty, 0, '', 0, 0); // Yes, it is a quantity, not a price, but we just want the formating role of function price
|
echo price($line->qty, 0, '', 0, 0); // Yes, it is a quantity, not a price, but we just want the formating role of function price
|
||||||
} else echo ' ';
|
} else echo ' ';
|
||||||
?>
|
print '</td>';
|
||||||
</td>
|
|
||||||
|
|
||||||
<?php
|
if ($conf->global->PRODUCT_USE_UNITS)
|
||||||
if($conf->global->PRODUCT_USE_UNITS)
|
{
|
||||||
{
|
|
||||||
print '<td class="linecoluseunit nowrap left">';
|
print '<td class="linecoluseunit nowrap left">';
|
||||||
$label = $line->getLabelOfUnit('short');
|
$label = $line->getLabelOfUnit('short');
|
||||||
if ($label !== '') {
|
if ($label !== '') {
|
||||||
print $langs->trans($label);
|
print $langs->trans($label);
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
?>
|
if (!empty($line->remise_percent) && $line->special_code != 3) {
|
||||||
|
print '<td class="linecoldiscount right">';
|
||||||
<?php if (!empty($line->remise_percent) && $line->special_code != 3) { ?>
|
|
||||||
<td class="linecoldiscount right"><?php
|
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
echo dol_print_reduction($line->remise_percent, $langs);
|
echo dol_print_reduction($line->remise_percent, $langs);
|
||||||
?></td>
|
print '</td>';
|
||||||
<?php } else { ?>
|
} else {
|
||||||
<td class="linecoldiscount"><?php $coldisplay++; ?> </td>
|
print '<td class="linecoldiscount"> </td>';
|
||||||
<?php }
|
$coldisplay++;
|
||||||
|
}
|
||||||
|
|
||||||
$rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT, $conf->global->MAIN_MAX_DECIMALS_TOT);
|
$rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT, $conf->global->MAIN_MAX_DECIMALS_TOT);
|
||||||
|
|
||||||
// Fields for situation invoices
|
// Fields for situation invoices
|
||||||
if ($this->situation_cycle_ref)
|
if ($this->situation_cycle_ref)
|
||||||
{
|
{
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
print '<td class="linecolcycleref nowrap right">' . $line->situation_percent . '%</td>';
|
print '<td class="linecolcycleref nowrap right">' . $line->situation_percent . '%</td>';
|
||||||
@@ -267,26 +255,24 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
|
|||||||
$locataxes_array = getLocalTaxesFromRate($line->tva.($line->vat_src_code ? ' ('.$line->vat_src_code.')' : ''), 0, ($senderissupplier?$mysoc:$object->thirdparty), ($senderissupplier?$object->thirdparty:$mysoc));
|
$locataxes_array = getLocalTaxesFromRate($line->tva.($line->vat_src_code ? ' ('.$line->vat_src_code.')' : ''), 0, ($senderissupplier?$mysoc:$object->thirdparty), ($senderissupplier?$object->thirdparty:$mysoc));
|
||||||
$tmp = calcul_price_total($line->qty, $line->pu, $line->remise_percent, $line->txtva, -1, -1, 0, 'HT', $line->info_bits, $line->type, ($senderissupplier?$object->thirdparty:$mysoc), $locataxes_array, 100, $object->multicurrency_tx, $line->multicurrency_subprice);
|
$tmp = calcul_price_total($line->qty, $line->pu, $line->remise_percent, $line->txtva, -1, -1, 0, 'HT', $line->info_bits, $line->type, ($senderissupplier?$object->thirdparty:$mysoc), $locataxes_array, 100, $object->multicurrency_tx, $line->multicurrency_subprice);
|
||||||
print '<td align="right" class="linecolcycleref2 nowrap">' . price($tmp[0]) . '</td>';
|
print '<td align="right" class="linecolcycleref2 nowrap">' . price($tmp[0]) . '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($usemargins && ! empty($conf->margin->enabled) && empty($user->societe_id))
|
if ($usemargins && ! empty($conf->margin->enabled) && empty($user->societe_id))
|
||||||
{
|
{
|
||||||
if (!empty($user->rights->margins->creer)) { ?>
|
if (!empty($user->rights->margins->creer)) { ?>
|
||||||
<td class="linecolmargin1 nowrap margininfos right"><?php $coldisplay++; ?><?php echo price($line->pa_ht); ?></td>
|
<td class="linecolmargin1 nowrap margininfos right"><?php $coldisplay++; ?><?php echo price($line->pa_ht); ?></td>
|
||||||
<?php } ?>
|
<?php }
|
||||||
<?php if (! empty($conf->global->DISPLAY_MARGIN_RATES) && $user->rights->margins->liretous) { ?>
|
if (! empty($conf->global->DISPLAY_MARGIN_RATES) && $user->rights->margins->liretous) { ?>
|
||||||
<td class="linecolmargin2 nowrap margininfos right"><?php $coldisplay++; ?><?php echo (($line->pa_ht == 0)?'n/a':price($line->marge_tx, null, null, null, null, $rounding).'%'); ?></td>
|
<td class="linecolmargin2 nowrap margininfos right"><?php $coldisplay++; ?><?php echo (($line->pa_ht == 0)?'n/a':price($line->marge_tx, null, null, null, null, $rounding).'%'); ?></td>
|
||||||
<?php }
|
<?php }
|
||||||
if (! empty($conf->global->DISPLAY_MARK_RATES) && $user->rights->margins->liretous) {?>
|
if (! empty($conf->global->DISPLAY_MARK_RATES) && $user->rights->margins->liretous) {?>
|
||||||
<td class="linecolmargin2 nowrap margininfos right"><?php $coldisplay++; ?><?php echo price($line->marque_tx, null, null, null, null, $rounding).'%'; ?></td>
|
<td class="linecolmargin2 nowrap margininfos right"><?php $coldisplay++; ?><?php echo price($line->marque_tx, null, null, null, null, $rounding).'%'; ?></td>
|
||||||
<?php }
|
<?php }
|
||||||
}
|
}
|
||||||
?>
|
if ($line->special_code == 3) { ?>
|
||||||
|
|
||||||
<?php if ($line->special_code == 3) { ?>
|
|
||||||
<td class="linecoloption nowrap right"><?php $coldisplay++; ?><?php echo $langs->trans('Option'); ?></td>
|
<td class="linecoloption nowrap right"><?php $coldisplay++; ?><?php echo $langs->trans('Option'); ?></td>
|
||||||
<?php } else { ?>
|
<?php } else {
|
||||||
<td class="linecolht nowrap right"><?php
|
print '<td class="linecolht nowrap right">';
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
||||||
{
|
{
|
||||||
@@ -303,74 +289,69 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
|
|||||||
{
|
{
|
||||||
print '</span>';
|
print '</span>';
|
||||||
}
|
}
|
||||||
?>
|
print '</td>';
|
||||||
</td>
|
if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) {
|
||||||
<?php if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { ?>
|
print '<td class="linecolutotalht_currency nowrap right">'.price($line->multicurrency_total_ht).'</td>';
|
||||||
<td class="linecolutotalht_currency nowrap right"><?php $coldisplay++; ?><?php echo price($line->multicurrency_total_ht); ?></td>
|
$coldisplay++;
|
||||||
<?php } ?>
|
}
|
||||||
<?php } ?>
|
}
|
||||||
<?php if ($outputalsopricetotalwithtax) { ?>
|
if ($outputalsopricetotalwithtax) {
|
||||||
<td class="linecolht nowrap right"><?php $coldisplay++; ?><?php echo price($line->total_ttc); ?></td>
|
print '<td class="linecolht nowrap right">'.price($line->total_ttc).'</td>';
|
||||||
<?php } ?>
|
$coldisplay++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->statut == 0 && ($object_rights->creer) && $action != 'selectlines' ) {
|
||||||
<?php
|
print '<td class="linecoledit center">';
|
||||||
if ($this->statut == 0 && ($object_rights->creer) && $action != 'selectlines' ) { ?>
|
$coldisplay++;
|
||||||
<td class="linecoledit center"><?php $coldisplay++; ?>
|
if (($line->info_bits & 2) == 2 || ! empty($disableedit)) {
|
||||||
<?php if (($line->info_bits & 2) == 2 || ! empty($disableedit)) { ?>
|
} else { ?>
|
||||||
<?php } else { ?>
|
|
||||||
<a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->id.'&action=editline&lineid='.$line->id.'#line_'.$line->id; ?>">
|
<a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->id.'&action=editline&lineid='.$line->id.'#line_'.$line->id; ?>">
|
||||||
<?php echo img_edit(); ?>
|
<?php echo img_edit().'</a>';
|
||||||
</a>
|
}
|
||||||
<?php } ?>
|
print '</td>';
|
||||||
</td>
|
|
||||||
|
|
||||||
<td class="linecoldelete center"><?php $coldisplay++; ?>
|
print '<td class="linecoldelete center">';
|
||||||
<?php
|
$coldisplay++;
|
||||||
if (($line->fk_prev_id == null ) && empty($disableremove)) { //La suppression n'est autorisée que si il n'y a pas de ligne dans une précédente situation
|
if (($line->fk_prev_id == null ) && empty($disableremove)) { //La suppression n'est autorisée que si il n'y a pas de ligne dans une précédente situation
|
||||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $this->id . '&action=ask_deleteline&lineid=' . $line->id . '">';
|
print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $this->id . '&action=ask_deleteline&lineid=' . $line->id . '">';
|
||||||
print img_delete();
|
print img_delete();
|
||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
?>
|
print '</td>';
|
||||||
</td>
|
|
||||||
|
|
||||||
<?php
|
if ($num > 1 && $conf->browser->layout != 'phone' && ($this->situation_counter == 1 || !$this->situation_cycle_ref) && empty($disablemove)) {
|
||||||
if ($num > 1 && $conf->browser->layout != 'phone' && ($this->situation_counter == 1 || !$this->situation_cycle_ref) && empty($disablemove)) { ?>
|
print '<td class="linecolmove tdlineupdown center">';
|
||||||
<td class="linecolmove tdlineupdown center"><?php $coldisplay++; ?>
|
$coldisplay++;
|
||||||
<?php if ($i > 0) { ?>
|
if ($i > 0) { ?>
|
||||||
<a class="lineupdown" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->id.'&action=up&rowid='.$line->id; ?>">
|
<a class="lineupdown" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->id.'&action=up&rowid='.$line->id; ?>">
|
||||||
<?php echo img_up('default', 0, 'imgupforline'); ?>
|
<?php echo img_up('default', 0, 'imgupforline'); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php }
|
||||||
<?php if ($i < $num-1) { ?>
|
if ($i < $num-1) { ?>
|
||||||
<a class="lineupdown" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->id.'&action=down&rowid='.$line->id; ?>">
|
<a class="lineupdown" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->id.'&action=down&rowid='.$line->id; ?>">
|
||||||
<?php echo img_down('default', 0, 'imgdownforline'); ?>
|
<?php echo img_down('default', 0, 'imgdownforline'); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php }
|
||||||
</td>
|
print '</td>';
|
||||||
<?php } else { ?>
|
|
||||||
<td <?php echo (($conf->browser->layout != 'phone' && empty($disablemove)) ?' class="linecolmove tdlineupdown center"':' class="linecolmove center"'); ?>><?php $coldisplay++; ?></td>
|
|
||||||
<?php } ?>
|
|
||||||
<?php
|
|
||||||
} else {
|
} else {
|
||||||
?>
|
print '<td '.(($conf->browser->layout != 'phone' && empty($disablemove)) ?' class="linecolmove tdlineupdown center"':' class="linecolmove center"').'></td>';
|
||||||
<td colspan="3"><?php $coldisplay=$coldisplay+3; ?></td>
|
$coldisplay++;
|
||||||
<?php
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
print '<td colspan="3"></td>';
|
||||||
|
$coldisplay = $coldisplay+3;
|
||||||
|
}
|
||||||
|
|
||||||
if ($action == 'selectlines') { ?>
|
if ($action == 'selectlines') { ?>
|
||||||
<td class="linecolcheck center"><input type="checkbox" class="linecheckbox" name="line_checkbox[<?php echo $i+1; ?>]" value="<?php echo $line->id; ?>" ></td>
|
<td class="linecolcheck center"><input type="checkbox" class="linecheckbox" name="line_checkbox[<?php echo $i+1; ?>]" value="<?php echo $line->id; ?>" ></td>
|
||||||
<?php } ?>
|
<?php }
|
||||||
|
|
||||||
</tr>
|
print "</tr>\n";
|
||||||
|
|
||||||
<?php
|
|
||||||
//Line extrafield
|
//Line extrafield
|
||||||
if (!empty($extrafields))
|
if (!empty($extrafields))
|
||||||
{
|
{
|
||||||
print $line->showOptionals($extrafields, 'view', array('style'=>'class="drag drop oddeven"','colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1);
|
print $line->showOptionals($extrafields, 'view', array('style'=>'class="drag drop oddeven"','colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1);
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- END PHP TEMPLATE objectline_view.tpl.php -->
|
print "<!-- END PHP TEMPLATE objectline_view.tpl.php -->\n";
|
||||||
|
|||||||
@@ -985,7 +985,7 @@ class ExpenseReport extends CommonObject
|
|||||||
$sql.= " , total_tva = ".$total_tva;
|
$sql.= " , total_tva = ".$total_tva;
|
||||||
$sql.= " WHERE rowid = ".$id;
|
$sql.= " WHERE rowid = ".$id;
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
if($result):
|
if ($result):
|
||||||
$this->db->free($result);
|
$this->db->free($result);
|
||||||
return 1;
|
return 1;
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -537,8 +537,9 @@ if ($resql)
|
|||||||
if (! empty($arrayfields['d.date_debut']['checked']))
|
if (! empty($arrayfields['d.date_debut']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre" align="center">';
|
print '<td class="liste_titre" align="center">';
|
||||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY))
|
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) {
|
||||||
print '<input class="flat width25" type="text" maxlength="2" name="day_start" value="'.dol_escape_htmltag($day_start).'">';
|
print '<input class="flat width25" type="text" maxlength="2" name="day_start" value="'.dol_escape_htmltag($day_start).'">';
|
||||||
|
}
|
||||||
|
|
||||||
print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="month_start" value="'.$month_start.'">';
|
print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="month_start" value="'.$month_start.'">';
|
||||||
$formother->select_year($year_start, 'year_start', 1, $min_year, $max_year);
|
$formother->select_year($year_start, 'year_start', 1, $min_year, $max_year);
|
||||||
@@ -548,8 +549,9 @@ if ($resql)
|
|||||||
if (! empty($arrayfields['d.date_fin']['checked']))
|
if (! empty($arrayfields['d.date_fin']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre" align="center">';
|
print '<td class="liste_titre" align="center">';
|
||||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY))
|
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) {
|
||||||
print '<input class="flat width25" type="text" maxlength="2" name="day_end" value="'.dol_escape_htmltag($day_end).'">';
|
print '<input class="flat width25" type="text" maxlength="2" name="day_end" value="'.dol_escape_htmltag($day_end).'">';
|
||||||
|
}
|
||||||
print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="month_end" value="'.$month_end.'">';
|
print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="month_end" value="'.$month_end.'">';
|
||||||
$formother->select_year($year_end, 'year_end', 1, $min_year, $max_year);
|
$formother->select_year($year_end, 'year_end', 1, $min_year, $max_year);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@@ -24,22 +24,20 @@ if (empty($conf) || ! is_object($conf))
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE -->
|
print "<!-- BEGIN PHP TEMPLATE -->\n";
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
$langs = $GLOBALS['langs'];
|
$langs = $GLOBALS['langs'];
|
||||||
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
||||||
|
|
||||||
$var=true;
|
$var = true;
|
||||||
$total=0;
|
$total = 0;
|
||||||
foreach($linkedObjectBlock as $key => $objectlink)
|
foreach($linkedObjectBlock as $key => $objectlink)
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<tr <?php echo $GLOBALS['bc'][$var]; ?> >
|
<tr <?php echo $GLOBALS['bc'][$var]; ?> >
|
||||||
<td><?php echo $langs->trans("ExpenseReport"); ?></td>
|
<td><?php echo $langs->trans("ExpenseReport"); ?></td>
|
||||||
<td><?php echo $objectlink->getNomUrl(1); ?></td>
|
<td><?php echo $objectlink->getNomUrl(1); ?></td>
|
||||||
@@ -53,8 +51,7 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
|||||||
<td class="right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
<td class="right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
||||||
<td class="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
|
<td class="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- END PHP TEMPLATE -->
|
print "<!-- END PHP TEMPLATE -->\n";
|
||||||
|
|||||||
@@ -1196,8 +1196,9 @@ elseif ($id > 0 || ! empty($ref))
|
|||||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->ficheinter->creer)
|
if ($user->rights->ficheinter->creer)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@@ -141,9 +141,10 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->ficheinter->creer)
|
if ($user->rights->ficheinter->creer)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
$morehtmlref.=' : ';
|
$morehtmlref.=' : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@@ -120,9 +120,10 @@ if ($object->id)
|
|||||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->commande->creer)
|
if ($user->rights->commande->creer)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
$morehtmlref.=' : ';
|
$morehtmlref.=' : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@@ -86,9 +86,10 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->commande->creer)
|
if ($user->rights->commande->creer)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
$morehtmlref.=' : ';
|
$morehtmlref.=' : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@@ -22,11 +22,9 @@ if (empty($conf) || ! is_object($conf))
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE -->
|
print "<!-- BEGIN PHP TEMPLATE -->\n";
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
@@ -37,14 +35,14 @@ $langs->load("interventions");
|
|||||||
|
|
||||||
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1);
|
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1);
|
||||||
|
|
||||||
$ilink=0;
|
$ilink = 0;
|
||||||
foreach($linkedObjectBlock as $key => $objectlink)
|
foreach($linkedObjectBlock as $key => $objectlink)
|
||||||
{
|
{
|
||||||
$ilink++;
|
$ilink++;
|
||||||
|
|
||||||
$trclass='oddeven';
|
$trclass='oddeven';
|
||||||
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
|
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
|
||||||
?>
|
?>
|
||||||
<tr class="<?php echo $trclass; ?>">
|
<tr class="<?php echo $trclass; ?>">
|
||||||
<td><?php echo $langs->trans("Intervention"); ?></td>
|
<td><?php echo $langs->trans("Intervention"); ?></td>
|
||||||
<td><?php echo $objectlink->getNomUrl(1); ?></td>
|
<td><?php echo $objectlink->getNomUrl(1); ?></td>
|
||||||
@@ -54,8 +52,7 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
|||||||
<td class="right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
<td class="right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
||||||
<td class="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
|
<td class="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- END PHP TEMPLATE -->
|
print "<!-- END PHP TEMPLATE -->\n";
|
||||||
|
|||||||
@@ -283,7 +283,8 @@ if (empty($user->societe_id) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTAT
|
|||||||
DOL_URL_ROOT.'/don/list.php?leftmenu=donations'
|
DOL_URL_ROOT.'/don/list.php?leftmenu=donations'
|
||||||
);
|
);
|
||||||
// Translation lang files
|
// Translation lang files
|
||||||
$langfile=array("users",
|
$langfile=array(
|
||||||
|
"users",
|
||||||
"companies",
|
"companies",
|
||||||
"prospects",
|
"prospects",
|
||||||
"suppliers",
|
"suppliers",
|
||||||
@@ -302,7 +303,7 @@ if (empty($user->societe_id) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTAT
|
|||||||
"projects",
|
"projects",
|
||||||
"trips",
|
"trips",
|
||||||
"holiday",
|
"holiday",
|
||||||
"donations"
|
"donations",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@@ -353,34 +354,34 @@ if (empty($user->societe_id) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTAT
|
|||||||
if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
||||||
$showweather = (empty($conf->global->MAIN_DISABLE_METEO) || $conf->global->MAIN_DISABLE_METEO == 2) ? 1 : 0;
|
$showweather = (empty($conf->global->MAIN_DISABLE_METEO) || $conf->global->MAIN_DISABLE_METEO == 2) ? 1 : 0;
|
||||||
|
|
||||||
//Array that contains all WorkboardResponse classes to process them
|
//Array that contains all WorkboardResponse classes to process them
|
||||||
$dashboardlines = array();
|
$dashboardlines = array();
|
||||||
|
|
||||||
// Do not include sections without management permission
|
// Do not include sections without management permission
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/class/workboardresponse.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/class/workboardresponse.class.php';
|
||||||
|
|
||||||
// Number of actions to do (late)
|
// Number of actions to do (late)
|
||||||
if (!empty($conf->agenda->enabled) && $user->rights->agenda->myactions->read) {
|
if (!empty($conf->agenda->enabled) && $user->rights->agenda->myactions->read) {
|
||||||
include_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php';
|
||||||
$board = new ActionComm($db);
|
$board = new ActionComm($db);
|
||||||
$dashboardlines[$board->element] = $board->load_board($user);
|
$dashboardlines[$board->element] = $board->load_board($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of project opened
|
// Number of project opened
|
||||||
if (!empty($conf->projet->enabled) && $user->rights->projet->lire) {
|
if (!empty($conf->projet->enabled) && $user->rights->projet->lire) {
|
||||||
include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
|
||||||
$board = new Project($db);
|
$board = new Project($db);
|
||||||
$dashboardlines[$board->element] = $board->load_board($user);
|
$dashboardlines[$board->element] = $board->load_board($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of tasks to do (late)
|
// Number of tasks to do (late)
|
||||||
if (!empty($conf->projet->enabled) && empty($conf->global->PROJECT_HIDE_TASKS) && $user->rights->projet->lire) {
|
if (!empty($conf->projet->enabled) && empty($conf->global->PROJECT_HIDE_TASKS) && $user->rights->projet->lire) {
|
||||||
include_once DOL_DOCUMENT_ROOT . '/projet/class/task.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/projet/class/task.class.php';
|
||||||
$board = new Task($db);
|
$board = new Task($db);
|
||||||
$dashboardlines[$board->element] = $board->load_board($user);
|
$dashboardlines[$board->element] = $board->load_board($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of commercial proposals opened (expired)
|
// Number of commercial proposals opened (expired)
|
||||||
if (!empty($conf->propal->enabled) && $user->rights->propale->lire) {
|
if (!empty($conf->propal->enabled) && $user->rights->propale->lire) {
|
||||||
include_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php';
|
||||||
$board = new Propal($db);
|
$board = new Propal($db);
|
||||||
@@ -389,7 +390,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
|||||||
$dashboardlines[$board->element . '_signed'] = $board->load_board($user, "signed");
|
$dashboardlines[$board->element . '_signed'] = $board->load_board($user, "signed");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of commercial proposals opened (expired)
|
// Number of commercial proposals opened (expired)
|
||||||
if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire) {
|
if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire) {
|
||||||
include_once DOL_DOCUMENT_ROOT . '/supplier_proposal/class/supplier_proposal.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/supplier_proposal/class/supplier_proposal.class.php';
|
||||||
$board = new SupplierProposal($db);
|
$board = new SupplierProposal($db);
|
||||||
@@ -398,14 +399,14 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
|||||||
$dashboardlines[$board->element . '_signed'] = $board->load_board($user, "signed");
|
$dashboardlines[$board->element . '_signed'] = $board->load_board($user, "signed");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of customer orders a deal
|
// Number of customer orders a deal
|
||||||
if (!empty($conf->commande->enabled) && $user->rights->commande->lire) {
|
if (!empty($conf->commande->enabled) && $user->rights->commande->lire) {
|
||||||
include_once DOL_DOCUMENT_ROOT . '/commande/class/commande.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/commande/class/commande.class.php';
|
||||||
$board = new Commande($db);
|
$board = new Commande($db);
|
||||||
$dashboardlines[$board->element] = $board->load_board($user);
|
$dashboardlines[$board->element] = $board->load_board($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of suppliers orders a deal
|
// Number of suppliers orders a deal
|
||||||
if (!empty($conf->supplier_order->enabled) && $user->rights->fournisseur->commande->lire) {
|
if (!empty($conf->supplier_order->enabled) && $user->rights->fournisseur->commande->lire) {
|
||||||
include_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.commande.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.commande.class.php';
|
||||||
$board = new CommandeFournisseur($db);
|
$board = new CommandeFournisseur($db);
|
||||||
@@ -413,7 +414,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
|||||||
$dashboardlines[$board->element . '_awaiting'] = $board->load_board($user, 'awaiting');
|
$dashboardlines[$board->element . '_awaiting'] = $board->load_board($user, 'awaiting');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of services enabled (delayed)
|
// Number of services enabled (delayed)
|
||||||
if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) {
|
if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) {
|
||||||
include_once DOL_DOCUMENT_ROOT . '/contrat/class/contrat.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/contrat/class/contrat.class.php';
|
||||||
$board = new Contrat($db);
|
$board = new Contrat($db);
|
||||||
@@ -421,21 +422,21 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
|||||||
// Number of active services (expired)
|
// Number of active services (expired)
|
||||||
$dashboardlines[$board->element . '_active'] = $board->load_board($user, "active");
|
$dashboardlines[$board->element . '_active'] = $board->load_board($user, "active");
|
||||||
}
|
}
|
||||||
// Number of invoices customers (has paid)
|
// Number of invoices customers (has paid)
|
||||||
if (!empty($conf->facture->enabled) && $user->rights->facture->lire) {
|
if (!empty($conf->facture->enabled) && $user->rights->facture->lire) {
|
||||||
include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
|
||||||
$board = new Facture($db);
|
$board = new Facture($db);
|
||||||
$dashboardlines[$board->element] = $board->load_board($user);
|
$dashboardlines[$board->element] = $board->load_board($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of supplier invoices (has paid)
|
// Number of supplier invoices (has paid)
|
||||||
if (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->fournisseur->facture->lire)) {
|
if (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->fournisseur->facture->lire)) {
|
||||||
include_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
|
||||||
$board = new FactureFournisseur($db);
|
$board = new FactureFournisseur($db);
|
||||||
$dashboardlines[$board->element] = $board->load_board($user);
|
$dashboardlines[$board->element] = $board->load_board($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of transactions to conciliate
|
// Number of transactions to conciliate
|
||||||
if (!empty($conf->banque->enabled) && $user->rights->banque->lire && !$user->societe_id) {
|
if (!empty($conf->banque->enabled) && $user->rights->banque->lire && !$user->societe_id) {
|
||||||
include_once DOL_DOCUMENT_ROOT . '/compta/bank/class/account.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/compta/bank/class/account.class.php';
|
||||||
$board = new Account($db);
|
$board = new Account($db);
|
||||||
@@ -445,35 +446,35 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of cheque to send
|
// Number of cheque to send
|
||||||
if (!empty($conf->banque->enabled) && $user->rights->banque->lire && !$user->societe_id && empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT)) {
|
if (!empty($conf->banque->enabled) && $user->rights->banque->lire && !$user->societe_id && empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT)) {
|
||||||
include_once DOL_DOCUMENT_ROOT . '/compta/paiement/cheque/class/remisecheque.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/compta/paiement/cheque/class/remisecheque.class.php';
|
||||||
$board = new RemiseCheque($db);
|
$board = new RemiseCheque($db);
|
||||||
$dashboardlines['RemiseCheque'] = $board->load_board($user);
|
$dashboardlines['RemiseCheque'] = $board->load_board($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of foundation members
|
// Number of foundation members
|
||||||
if (!empty($conf->adherent->enabled) && $user->rights->adherent->lire && !$user->societe_id) {
|
if (!empty($conf->adherent->enabled) && $user->rights->adherent->lire && !$user->societe_id) {
|
||||||
include_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php';
|
||||||
$board = new Adherent($db);
|
$board = new Adherent($db);
|
||||||
$dashboardlines['Adherent'] = $board->load_board($user);
|
$dashboardlines['Adherent'] = $board->load_board($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of expense reports to approve
|
// Number of expense reports to approve
|
||||||
if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->approve) {
|
if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->approve) {
|
||||||
include_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php';
|
||||||
$board = new ExpenseReport($db);
|
$board = new ExpenseReport($db);
|
||||||
$dashboardlines['ExpenseReport'] = $board->load_board($user, 'toapprove');
|
$dashboardlines['ExpenseReport'] = $board->load_board($user, 'toapprove');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of expense reports to pay
|
// Number of expense reports to pay
|
||||||
if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->to_paid) {
|
if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->to_paid) {
|
||||||
include_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php';
|
||||||
$board = new ExpenseReport($db);
|
$board = new ExpenseReport($db);
|
||||||
$dashboardlines['ExpenseReport'] = $board->load_board($user, 'topay');
|
$dashboardlines['ExpenseReport'] = $board->load_board($user, 'topay');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of holidays to approve
|
// Number of holidays to approve
|
||||||
if (!empty($conf->holiday->enabled) && $user->rights->holiday->approve) {
|
if (!empty($conf->holiday->enabled) && $user->rights->holiday->approve) {
|
||||||
include_once DOL_DOCUMENT_ROOT . '/holiday/class/holiday.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/holiday/class/holiday.class.php';
|
||||||
$board = new Holiday($db);
|
$board = new Holiday($db);
|
||||||
@@ -591,11 +592,11 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Calculate total nb of late
|
// Calculate total nb of late
|
||||||
$totallate = $totaltodo = 0;
|
$totallate = $totaltodo = 0;
|
||||||
|
|
||||||
//Remove any invalid response
|
//Remove any invalid response
|
||||||
//load_board can return an integer if failed or WorkboardResponse if OK
|
//load_board can return an integer if failed or WorkboardResponse if OK
|
||||||
$valid_dashboardlines = array();
|
$valid_dashboardlines = array();
|
||||||
foreach ($dashboardlines as $infoKey => $tmp) {
|
foreach ($dashboardlines as $infoKey => $tmp) {
|
||||||
if ($tmp instanceof WorkboardResponse) {
|
if ($tmp instanceof WorkboardResponse) {
|
||||||
@@ -603,7 +604,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// We calculate $totallate. Must be defined before start of next loop because it is show in first fetch on next loop
|
// We calculate $totallate. Must be defined before start of next loop because it is show in first fetch on next loop
|
||||||
foreach ($valid_dashboardlines as $board) {
|
foreach ($valid_dashboardlines as $board) {
|
||||||
if ($board->nbtodolate > 0) {
|
if ($board->nbtodolate > 0) {
|
||||||
$totaltodo += $board->nbtodo;
|
$totaltodo += $board->nbtodo;
|
||||||
@@ -645,7 +646,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
|||||||
$boxwork .= '</th>';
|
$boxwork .= '</th>';
|
||||||
$boxwork .= '</tr>' . "\n";
|
$boxwork .= '</tr>' . "\n";
|
||||||
|
|
||||||
// Show dashboard
|
// Show dashboard
|
||||||
$nbworkboardempty = 0;
|
$nbworkboardempty = 0;
|
||||||
$isIntopOpenedDashBoard = $globalStatInTopOpenedDashBoard = array();
|
$isIntopOpenedDashBoard = $globalStatInTopOpenedDashBoard = array();
|
||||||
if (!empty($valid_dashboardlines)) {
|
if (!empty($valid_dashboardlines)) {
|
||||||
|
|||||||
@@ -390,8 +390,9 @@ if ($id)
|
|||||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->salaries->write)
|
if ($user->rights->salaries->write)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@@ -32,15 +32,15 @@ if (empty($conf) || ! is_object($conf))
|
|||||||
<?php echo $this->control->tpl['error']; ?>
|
<?php echo $this->control->tpl['error']; ?>
|
||||||
|
|
||||||
<?php if ($conf->use_javascript_ajax) { ?>
|
<?php if ($conf->use_javascript_ajax) { ?>
|
||||||
<?php echo $this->control->tpl['ajax_selecttype']; ?>
|
<?php echo $this->control->tpl['ajax_selecttype']; ?>
|
||||||
<br>
|
<br>
|
||||||
<?php echo $langs->trans("ThirdPartyType") ?>:
|
<?php echo $langs->trans("ThirdPartyType") ?>:
|
||||||
<input type="radio" id="radiocompany" class="flat" name="private" value="0" checked>
|
<input type="radio" id="radiocompany" class="flat" name="private" value="0" checked>
|
||||||
<?php echo $langs->trans("CompanyFoundation"); ?>
|
<?php echo $langs->trans("CompanyFoundation"); ?>
|
||||||
<input type="radio" id="radioprivate" class="flat" name="private" value="1"> <?php echo $langs->trans("Individual"); ?> (<?php echo $langs->trans("ToCreateContactWithSameName") ?>)
|
<input type="radio" id="radioprivate" class="flat" name="private" value="1"> <?php echo $langs->trans("Individual"); ?> (<?php echo $langs->trans("ToCreateContactWithSameName") ?>)
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<?php echo $this->control->tpl['ajax_selectcountry']; ?>
|
<?php echo $this->control->tpl['ajax_selectcountry']; ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if ($this->control->tpl['js_checkVatPopup']) echo $this->control->tpl['js_checkVatPopup']; ?>
|
<?php if ($this->control->tpl['js_checkVatPopup']) echo $this->control->tpl['js_checkVatPopup']; ?>
|
||||||
@@ -96,14 +96,15 @@ if (empty($conf) || ! is_object($conf))
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php if (count($this->control->tpl['suppliercategory']) > 0) { ?>
|
<?php if (count($this->control->tpl['suppliercategory']) > 0) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo $langs->trans('SupplierCategory'); ?></td>
|
<td><?php echo $langs->trans('SupplierCategory'); ?></td>
|
||||||
<td colspan="3"><?php echo $this->control->tpl['select_suppliercategory']; ?></td>
|
<td colspan="3"><?php echo $this->control->tpl['select_suppliercategory']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } }?>
|
<?php }
|
||||||
|
}
|
||||||
|
|
||||||
<?php if (! empty($conf->barcode->enabled)) { ?>
|
if (! empty($conf->barcode->enabled)) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo $langs->trans('Gencod'); ?></td>
|
<td><?php echo $langs->trans('Gencod'); ?></td>
|
||||||
<td colspan="3"><input type="text" name="barcode" value="<?php echo $this->control->tpl['barcode']; ?>"></td>
|
<td colspan="3"><input type="text" name="barcode" value="<?php echo $this->control->tpl['barcode']; ?>"></td>
|
||||||
|
|||||||
@@ -116,12 +116,11 @@ if ($this->control->tpl['fournisseur']) {
|
|||||||
<td><?php echo $langs->trans('SupplierCategory'); ?></td>
|
<td><?php echo $langs->trans('SupplierCategory'); ?></td>
|
||||||
<td colspan="3"><?php echo $this->control->tpl['select_suppliercategory']; ?></td>
|
<td colspan="3"><?php echo $this->control->tpl['select_suppliercategory']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|
||||||
<?php if (! empty($conf->barcode->enabled)) { ?>
|
if (! empty($conf->barcode->enabled)) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo $langs->trans('Gencod'); ?></td>
|
<td><?php echo $langs->trans('Gencod'); ?></td>
|
||||||
<td colspan="3"><input type="text" name="barcode" value="<?php echo $this->control->tpl['barcode']; ?>"></td>
|
<td colspan="3"><input type="text" name="barcode" value="<?php echo $this->control->tpl['barcode']; ?>"></td>
|
||||||
@@ -209,9 +208,9 @@ for ($i=1; $i<=4; $i++) {
|
|||||||
<td><?php echo $langs->trans("DefaultLang"); ?></td>
|
<td><?php echo $langs->trans("DefaultLang"); ?></td>
|
||||||
<td colspan="3"><?php echo $this->control->tpl['select_lang']; ?></td>
|
<td colspan="3"><?php echo $this->control->tpl['select_lang']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php }
|
||||||
|
|
||||||
<?php if(!empty($this->control->tpl['localtax'])) echo $this->control->tpl['localtax']; ?>
|
if(!empty($this->control->tpl['localtax'])) echo $this->control->tpl['localtax']; ?>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
|
|||||||
@@ -25,10 +25,8 @@ if (empty($conf) || ! is_object($conf))
|
|||||||
|
|
||||||
$soc = $GLOBALS['objcanvas']->control->object;
|
$soc = $GLOBALS['objcanvas']->control->object;
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE CARD_VIEW.TPL.PHP COMPANY -->
|
print "<!-- BEGIN PHP TEMPLATE CARD_VIEW.TPL.PHP COMPANY -->\n";
|
||||||
<?php
|
|
||||||
|
|
||||||
$head = societe_prepare_head($soc);
|
$head = societe_prepare_head($soc);
|
||||||
|
|
||||||
|
|||||||
@@ -32,15 +32,15 @@ if (empty($conf) || ! is_object($conf))
|
|||||||
<?php echo $this->control->tpl['error']; ?>
|
<?php echo $this->control->tpl['error']; ?>
|
||||||
|
|
||||||
<?php if ($conf->use_javascript_ajax) { ?>
|
<?php if ($conf->use_javascript_ajax) { ?>
|
||||||
<?php echo $this->control->tpl['ajax_selecttype']; ?>
|
<?php echo $this->control->tpl['ajax_selecttype']; ?>
|
||||||
<br>
|
<br>
|
||||||
<?php echo $langs->trans("ThirdPartyType") ?>:
|
<?php echo $langs->trans("ThirdPartyType") ?>:
|
||||||
<input type="radio" id="radiocompany" class="flat" name="private" value="0">
|
<input type="radio" id="radiocompany" class="flat" name="private" value="0">
|
||||||
<?php echo $langs->trans("CompanyFoundation"); ?>
|
<?php echo $langs->trans("CompanyFoundation"); ?>
|
||||||
<input type="radio" id="radioprivate" class="flat" name="private" value="1" checked> <?php echo $langs->trans("Individual"); ?> (<?php echo $langs->trans("ToCreateContactWithSameName") ?>)
|
<input type="radio" id="radioprivate" class="flat" name="private" value="1" checked> <?php echo $langs->trans("Individual"); ?> (<?php echo $langs->trans("ToCreateContactWithSameName") ?>)
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<?php echo $this->control->tpl['ajax_selectcountry']; ?>
|
<?php echo $this->control->tpl['ajax_selectcountry']; ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="POST" name="formsoc">
|
<form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="POST" name="formsoc">
|
||||||
@@ -106,14 +106,15 @@ if (empty($conf) || ! is_object($conf))
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php if (count($this->control->tpl['suppliercategory']) > 0) { ?>
|
<?php if (count($this->control->tpl['suppliercategory']) > 0) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo $langs->trans('SupplierCategory'); ?></td>
|
<td><?php echo $langs->trans('SupplierCategory'); ?></td>
|
||||||
<td colspan="3"><?php echo $this->control->tpl['select_suppliercategory']; ?></td>
|
<td colspan="3"><?php echo $this->control->tpl['select_suppliercategory']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } }?>
|
<?php }
|
||||||
|
}
|
||||||
|
|
||||||
<?php if (! empty($conf->barcode->enabled)) { ?>
|
if (! empty($conf->barcode->enabled)) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo $langs->trans('Gencod'); ?></td>
|
<td><?php echo $langs->trans('Gencod'); ?></td>
|
||||||
<td colspan="3"><input type="text" name="barcode" value="<?php echo $this->control->tpl['barcode']; ?>"></td>
|
<td colspan="3"><input type="text" name="barcode" value="<?php echo $this->control->tpl['barcode']; ?>"></td>
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ if ($this->control->tpl['fournisseur']) {
|
|||||||
<td><?php echo $langs->trans('SupplierCategory'); ?></td>
|
<td><?php echo $langs->trans('SupplierCategory'); ?></td>
|
||||||
<td colspan="3"><?php echo $this->control->tpl['select_suppliercategory']; ?></td>
|
<td colspan="3"><?php echo $this->control->tpl['select_suppliercategory']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -25,19 +25,15 @@ if (empty($conf) || ! is_object($conf))
|
|||||||
|
|
||||||
$object = $GLOBALS['objcanvas']->control->object;
|
$object = $GLOBALS['objcanvas']->control->object;
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE CARD_VIEW.TPL.PHP INDIVIDUAL -->
|
print "<!-- BEGIN PHP TEMPLATE CARD_VIEW.TPL.PHP INDIVIDUAL -->\n";
|
||||||
<?php
|
|
||||||
|
|
||||||
$head = societe_prepare_head($object);
|
$head = societe_prepare_head($object);
|
||||||
|
|
||||||
dol_fiche_head($head, 'card', $langs->trans("ThirdParty"), 0, 'company');
|
dol_fiche_head($head, 'card', $langs->trans("ThirdParty"), 0, 'company');
|
||||||
|
|
||||||
?>
|
if ($this->control->tpl['error']) echo $this->control->tpl['error'];
|
||||||
|
if ($this->control->tpl['action_delete']) echo $this->control->tpl['action_delete']; ?>
|
||||||
<?php if ($this->control->tpl['error']) echo $this->control->tpl['error']; ?>
|
|
||||||
<?php if ($this->control->tpl['action_delete']) echo $this->control->tpl['action_delete']; ?>
|
|
||||||
|
|
||||||
<table class="border allwidth">
|
<table class="border allwidth">
|
||||||
|
|
||||||
@@ -230,6 +226,5 @@ $result=show_contacts($conf, $langs, $db, $object);
|
|||||||
|
|
||||||
// Projects list
|
// Projects list
|
||||||
$result=show_projects($conf, $langs, $db, $object);
|
$result=show_projects($conf, $langs, $db, $object);
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- END PHP TEMPLATE -->
|
print "<!-- END PHP TEMPLATE -->\n";
|
||||||
|
|||||||
@@ -1060,12 +1060,13 @@ class Thirdparties extends DolibarrApi
|
|||||||
|
|
||||||
$returnAccounts = array();
|
$returnAccounts = array();
|
||||||
|
|
||||||
foreach($accounts as $account){
|
foreach ($accounts as $account) {
|
||||||
$object= array();
|
$object = array();
|
||||||
foreach($account as $key => $value)
|
foreach ($account as $key => $value) {
|
||||||
if(in_array($key, $fields)){
|
if (in_array($key, $fields)) {
|
||||||
$object[$key] = $value;
|
$object[$key] = $value;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$returnAccounts[] = $object;
|
$returnAccounts[] = $object;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1321,12 +1322,13 @@ class Thirdparties extends DolibarrApi
|
|||||||
|
|
||||||
$returnAccounts = array();
|
$returnAccounts = array();
|
||||||
|
|
||||||
foreach($accounts as $account){
|
foreach ($accounts as $account) {
|
||||||
$object= array();
|
$object = array();
|
||||||
foreach($account as $key => $value)
|
foreach ($account as $key => $value) {
|
||||||
if(in_array($key, $fields)){
|
if(in_array($key, $fields)) {
|
||||||
$object[$key] = $value;
|
$object[$key] = $value;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$returnAccounts[] = $object;
|
$returnAccounts[] = $object;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1439,17 +1441,19 @@ class Thirdparties extends DolibarrApi
|
|||||||
$account->fk_soc = $id;
|
$account->fk_soc = $id;
|
||||||
$account->site = $site;
|
$account->site = $site;
|
||||||
|
|
||||||
if ($account->create(DolibarrApiAccess::$user) < 0)
|
if ($account->create(DolibarrApiAccess::$user) < 0) {
|
||||||
throw new RestException(500, 'Error creating SocieteAccount entity.');
|
throw new RestException(500, 'Error creating SocieteAccount entity.');
|
||||||
|
}
|
||||||
// We found an existing SocieteAccount entity, we are replacing it
|
// We found an existing SocieteAccount entity, we are replacing it
|
||||||
} else {
|
} else {
|
||||||
if(isset($request_data['site']) && $request_data['site'] !== $site) {
|
if (isset($request_data['site']) && $request_data['site'] !== $site) {
|
||||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe_account WHERE fk_soc = ".$id." AND site = '". $request_data['site']."' ";
|
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe_account WHERE fk_soc = ".$id." AND site = '". $request_data['site']."' ";
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
|
|
||||||
if($result->num_rows !== 0)
|
if ($result->num_rows !== 0) {
|
||||||
throw new RestException(409, "You are trying to update this thirdparty SocieteAccount (gateway record) from $site to ".$request_data['site'] . " but another SocieteAccount entity already exists with this site key.");
|
throw new RestException(409, "You are trying to update this thirdparty SocieteAccount (gateway record) from $site to ".$request_data['site'] . " but another SocieteAccount entity already exists with this site key.");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$obj = $db->fetch_object($result);
|
$obj = $db->fetch_object($result);
|
||||||
|
|
||||||
|
|||||||
@@ -619,9 +619,7 @@ if (empty($reshook))
|
|||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."oauth_token";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."oauth_token";
|
||||||
$sql.= " SET tokenstring = '".dol_json_encode($tokenstring)."'";
|
$sql.= " SET tokenstring = '".dol_json_encode($tokenstring)."'";
|
||||||
$sql.= " WHERE fk_soc = ".$object->id." AND service = '".$service."' AND entity = ".$conf->entity; // Keep = here for entity. Only 1 record must be modified !
|
$sql.= " WHERE fk_soc = ".$object->id." AND service = '".$service."' AND entity = ".$conf->entity; // Keep = here for entity. Only 1 record must be modified !
|
||||||
}
|
} catch(Exception $e) {
|
||||||
catch(Exception $e)
|
|
||||||
{
|
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($e->getMessage(), null, 'errors');
|
setEventMessages($e->getMessage(), null, 'errors');
|
||||||
}
|
}
|
||||||
@@ -637,9 +635,7 @@ if (empty($reshook))
|
|||||||
$tokenstring['type'] = $stripesup->type;
|
$tokenstring['type'] = $stripesup->type;
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."oauth_token (service, fk_soc, entity, tokenstring)";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."oauth_token (service, fk_soc, entity, tokenstring)";
|
||||||
$sql .= " VALUES ('".$service."', ".$object->id.", ".$conf->entity.", '".dol_json_encode($tokenstring)."')";
|
$sql .= " VALUES ('".$service."', ".$object->id.", ".$conf->entity.", '".dol_json_encode($tokenstring)."')";
|
||||||
}
|
} catch(Exception $e) {
|
||||||
catch(Exception $e)
|
|
||||||
{
|
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($e->getMessage(), null, 'errors');
|
setEventMessages($e->getMessage(), null, 'errors');
|
||||||
}
|
}
|
||||||
@@ -709,13 +705,15 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$cu=$stripe->customerStripe($object, $stripeacc, $servicestatus);
|
$cu = $stripe->customerStripe($object, $stripeacc, $servicestatus);
|
||||||
$card=$cu->sources->retrieve("$source");
|
$card = $cu->sources->retrieve("$source");
|
||||||
if ($card)
|
if ($card) {
|
||||||
{
|
|
||||||
// $card->detach(); Does not work with card_, only with src_
|
// $card->detach(); Does not work with card_, only with src_
|
||||||
if (method_exists($card, 'detach')) $card->detach();
|
if (method_exists($card, 'detach')) {
|
||||||
else $card->delete();
|
$card->detach();
|
||||||
|
} else {
|
||||||
|
$card->delete();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1318,8 +1316,11 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
|
|||||||
foreach ($balance->available as $cpt)
|
foreach ($balance->available as $cpt)
|
||||||
{
|
{
|
||||||
$arrayzerounitcurrency=array('BIF', 'CLP', 'DJF', 'GNF', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'VND', 'VUV', 'XAF', 'XOF', 'XPF');
|
$arrayzerounitcurrency=array('BIF', 'CLP', 'DJF', 'GNF', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'VND', 'VUV', 'XAF', 'XOF', 'XPF');
|
||||||
if (! in_array($cpt->currency, $arrayzerounitcurrency)) $currencybalance[$cpt->currency]->available=$cpt->amount / 100;
|
if (! in_array($cpt->currency, $arrayzerounitcurrency)) {
|
||||||
else $currencybalance[$cpt->currency]->available=$cpt->amount;
|
$currencybalance[$cpt->currency]->available=$cpt->amount / 100;
|
||||||
|
} else {
|
||||||
|
$currencybalance[$cpt->currency]->available=$cpt->amount;
|
||||||
|
}
|
||||||
$currencybalance[$cpt->currency]->currency=$cpt->currency;
|
$currencybalance[$cpt->currency]->currency=$cpt->currency;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1329,8 +1330,11 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
|
|||||||
foreach ($balance->pending as $cpt)
|
foreach ($balance->pending as $cpt)
|
||||||
{
|
{
|
||||||
$arrayzerounitcurrency=array('BIF', 'CLP', 'DJF', 'GNF', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'VND', 'VUV', 'XAF', 'XOF', 'XPF');
|
$arrayzerounitcurrency=array('BIF', 'CLP', 'DJF', 'GNF', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'VND', 'VUV', 'XAF', 'XOF', 'XPF');
|
||||||
if (! in_array($cpt->currency, $arrayzerounitcurrency)) $currencybalance[$cpt->currency]->pending=$currencybalance[$cpt->currency]->available+$cpt->amount / 100;
|
if (! in_array($cpt->currency, $arrayzerounitcurrency)) {
|
||||||
else $currencybalance[$cpt->currency]->pending=$currencybalance[$cpt->currency]->available+$cpt->amount;
|
$currencybalance[$cpt->currency]->pending=$currencybalance[$cpt->currency]->available+$cpt->amount / 100;
|
||||||
|
} else {
|
||||||
|
$currencybalance[$cpt->currency]->pending=$currencybalance[$cpt->currency]->available+$cpt->amount;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1394,12 +1398,13 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
|
|||||||
$string .= $rib->code_guichet.' ';
|
$string .= $rib->code_guichet.' ';
|
||||||
} elseif ($val == 'BankAccountNumberKey') {
|
} elseif ($val == 'BankAccountNumberKey') {
|
||||||
$string .= $rib->cle_rib.' ';
|
$string .= $rib->cle_rib.' ';
|
||||||
/* Already output after
|
|
||||||
}elseif ($val == 'BIC') {
|
|
||||||
$string .= $rib->bic.' ';
|
|
||||||
}elseif ($val == 'IBAN') {
|
|
||||||
$string .= $rib->iban.' ';*/
|
|
||||||
}
|
}
|
||||||
|
// Already output after
|
||||||
|
// } elseif ($val == 'BIC') {
|
||||||
|
// $string .= $rib->bic.' ';
|
||||||
|
// } elseif ($val == 'IBAN') {
|
||||||
|
// $string .= $rib->iban.' ';*/
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
if (! empty($rib->label) && $rib->number) {
|
if (! empty($rib->label) && $rib->number) {
|
||||||
if (! checkBanForAccount($rib)) {
|
if (! checkBanForAccount($rib)) {
|
||||||
|
|||||||
@@ -177,12 +177,12 @@ print "</tr>\n";
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td class="titlefield">';
|
print '<td class="titlefield">';
|
||||||
print $langs->trans("StripeLiveEnabled").'</td><td>';
|
print $langs->trans("StripeLiveEnabled").'</td><td>';
|
||||||
if ($conf->use_javascript_ajax) {
|
if ($conf->use_javascript_ajax) {
|
||||||
print ajax_constantonoff('STRIPE_LIVE');
|
print ajax_constantonoff('STRIPE_LIVE');
|
||||||
} else {
|
} else {
|
||||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||||
print $form->selectarray("STRIPE_LIVE", $arrval, $conf->global->STRIPE_LIVE);
|
print $form->selectarray("STRIPE_LIVE", $arrval, $conf->global->STRIPE_LIVE);
|
||||||
}
|
}
|
||||||
print '</td><td></td></tr>';
|
print '</td><td></td></tr>';
|
||||||
|
|
||||||
if (empty($conf->stripeconnect->enabled))
|
if (empty($conf->stripeconnect->enabled))
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2018 Thibault FOUCART <support@ptibogxiv.net>
|
/* Copyright (C) 2018 Thibault FOUCART <support@ptibogxiv.net>
|
||||||
|
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@@ -121,9 +122,9 @@ if (!$rowid)
|
|||||||
//print $list;
|
//print $list;
|
||||||
foreach ($list->data as $charge)
|
foreach ($list->data as $charge)
|
||||||
{
|
{
|
||||||
if ($charge->refunded=='1'){
|
if ($charge->refunded=='1') {
|
||||||
$status = img_picto($langs->trans("refunded"), 'statut6');
|
$status = img_picto($langs->trans("refunded"), 'statut6');
|
||||||
} elseif ($charge->paid=='1'){
|
} elseif ($charge->paid=='1') {
|
||||||
$status = img_picto($langs->trans("".$charge->status.""), 'statut4');
|
$status = img_picto($langs->trans("".$charge->status.""), 'statut4');
|
||||||
} else {
|
} else {
|
||||||
$label="Message: ".$charge->failure_message."<br>";
|
$label="Message: ".$charge->failure_message."<br>";
|
||||||
@@ -132,8 +133,7 @@ if (!$rowid)
|
|||||||
$status = $form->textwithpicto(img_picto($langs->trans("".$charge->status.""), 'statut8'), $label, 1);
|
$status = $form->textwithpicto(img_picto($langs->trans("".$charge->status.""), 'statut8'), $label, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($charge->payment_method_details->type=='card')
|
if ($charge->payment_method_details->type=='card') {
|
||||||
{
|
|
||||||
$type = $langs->trans("card");
|
$type = $langs->trans("card");
|
||||||
} elseif ($charge->source->type=='card'){
|
} elseif ($charge->source->type=='card'){
|
||||||
$type = $langs->trans("card");
|
$type = $langs->trans("card");
|
||||||
@@ -211,19 +211,25 @@ if (!$rowid)
|
|||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
// Origine
|
// Origine
|
||||||
print "<td>";
|
print "<td>";
|
||||||
if ($charge->metadata->dol_type=="order"){
|
if ($charge->metadata->dol_type=="order") {
|
||||||
$object = new Commande($db);
|
$object = new Commande($db);
|
||||||
$object->fetch($charge->metadata->dol_id);
|
$object->fetch($charge->metadata->dol_id);
|
||||||
if ($object->id > 0) {
|
if ($object->id > 0) {
|
||||||
print "<a href='".DOL_URL_ROOT."/commande/card.php?id=".$object->id."'>".img_picto('', 'object_order')." ".$object->ref."</a>";
|
print "<a href='".DOL_URL_ROOT."/commande/card.php?id=".$object->id."'>".img_picto('', 'object_order')." ".$object->ref."</a>";
|
||||||
} else print $FULLTAG;
|
} else {
|
||||||
} elseif ($charge->metadata->dol_type=="invoice"){
|
print $FULLTAG;
|
||||||
|
}
|
||||||
|
} elseif ($charge->metadata->dol_type=="invoice") {
|
||||||
$object = new Facture($db);
|
$object = new Facture($db);
|
||||||
$object->fetch($charge->metadata->dol_id);
|
$object->fetch($charge->metadata->dol_id);
|
||||||
if ($object->id > 0) {
|
if ($object->id > 0) {
|
||||||
print "<a href='".DOL_URL_ROOT."/compta/facture/card.php?facid=".$charge->metadata->dol_id."'>".img_picto('', 'object_invoice')." ".$object->ref."</a>";
|
print "<a href='".DOL_URL_ROOT."/compta/facture/card.php?facid=".$charge->metadata->dol_id."'>".img_picto('', 'object_invoice')." ".$object->ref."</a>";
|
||||||
} else print $FULLTAG;
|
} else {
|
||||||
} else print $FULLTAG;
|
print $FULLTAG;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
print $FULLTAG;
|
||||||
|
}
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
// Date payment
|
// Date payment
|
||||||
print '<td class="center">'.dol_print_date($charge->created, '%d/%m/%Y %H:%M')."</td>\n";
|
print '<td class="center">'.dol_print_date($charge->created, '%d/%m/%Y %H:%M')."</td>\n";
|
||||||
|
|||||||
@@ -62,6 +62,9 @@ class Stripe extends CommonObject
|
|||||||
public $code;
|
public $code;
|
||||||
public $declinecode;
|
public $declinecode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Message
|
||||||
|
*/
|
||||||
public $message;
|
public $message;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -338,8 +341,11 @@ class Stripe extends CommonObject
|
|||||||
} elseif ($fee < $conf->global->STRIPE_APPLICATION_FEE_MINIMAL) {
|
} elseif ($fee < $conf->global->STRIPE_APPLICATION_FEE_MINIMAL) {
|
||||||
$fee = $conf->global->STRIPE_APPLICATION_FEE_MINIMAL;
|
$fee = $conf->global->STRIPE_APPLICATION_FEE_MINIMAL;
|
||||||
}
|
}
|
||||||
if (! in_array($currency_code, $arrayzerounitcurrency)) $stripefee = round($fee * 100);
|
if (! in_array($currency_code, $arrayzerounitcurrency)) {
|
||||||
else $stripefee = round($fee);
|
$stripefee = round($fee * 100);
|
||||||
|
} else {
|
||||||
|
$stripefee = round($fee);
|
||||||
|
}
|
||||||
|
|
||||||
$paymentintent = null;
|
$paymentintent = null;
|
||||||
|
|
||||||
|
|||||||
@@ -187,11 +187,11 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
// if (! GETPOST('paiementcode'))
|
/*if (! GETPOST('paiementcode'))
|
||||||
// {
|
{
|
||||||
// setEventMessages($langs->transnoentities('ErrorFieldRequired',$langs->transnoentities('PaymentMode')), null, 'errors');
|
setEventMessages($langs->transnoentities('ErrorFieldRequired',$langs->transnoentities('PaymentMode')), null, 'errors');
|
||||||
// $error++;
|
$error++;
|
||||||
// }
|
}*/
|
||||||
|
|
||||||
if (! empty($conf->banque->enabled))
|
if (! empty($conf->banque->enabled))
|
||||||
{
|
{
|
||||||
@@ -209,11 +209,11 @@ if (empty($reshook))
|
|||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (empty($datepaye))
|
/*if (empty($datepaye))
|
||||||
// {
|
{
|
||||||
// setEventMessages($langs->transnoentities('ErrorFieldRequired',$langs->transnoentities('Date')), null, 'errors');
|
setEventMessages($langs->transnoentities('ErrorFieldRequired',$langs->transnoentities('Date')), null, 'errors');
|
||||||
// $error++;
|
$error++;
|
||||||
// }
|
}*/
|
||||||
|
|
||||||
// Check if payments in both currency
|
// Check if payments in both currency
|
||||||
if ($totalpayment > 0 && $multicurrency_totalpayment > 0)
|
if ($totalpayment > 0 && $multicurrency_totalpayment > 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user