forked from Wavyzz/dolibarr
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop6
This commit is contained in:
@@ -488,28 +488,35 @@ class CMailFile
|
||||
|
||||
// Check number of recipient is lower or equal than MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL
|
||||
if (empty($conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL)) $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL=10;
|
||||
$tmparray = explode(',', $this->addr_to);
|
||||
if (count($tmparray) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL)
|
||||
$tmparray1 = explode(',', $this->addr_to);
|
||||
if (count($tmparray1) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_TO_IN_SAME_EMAIL)
|
||||
{
|
||||
$this->error = 'Too much recipients in to:';
|
||||
dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING);
|
||||
return false;
|
||||
}
|
||||
$tmparray = explode(',', $this->addr_cc);
|
||||
if (count($tmparray) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL)
|
||||
$tmparray2 = explode(',', $this->addr_cc);
|
||||
if (count($tmparray2) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_CC_IN_SAME_EMAIL)
|
||||
{
|
||||
$this->error = 'Too much recipients in cc:';
|
||||
dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING);
|
||||
return false;
|
||||
}
|
||||
$tmparray = explode(',', $this->addr_bcc);
|
||||
if (count($tmparray) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL)
|
||||
$tmparray3 = explode(',', $this->addr_bcc);
|
||||
if (count($tmparray3) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_BCC_IN_SAME_EMAIL)
|
||||
{
|
||||
$this->error = 'Too much recipients in bcc:';
|
||||
dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING);
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((count($tmparray1)+count($tmparray2)+count($tmparray3)) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL)
|
||||
{
|
||||
$this->error = 'Too much recipients in to:, cc:, bcc:';
|
||||
dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// Action according to choosed sending method
|
||||
if ($conf->global->MAIN_MAIL_SENDMODE == 'mail')
|
||||
{
|
||||
@@ -538,25 +545,28 @@ class CMailFile
|
||||
}
|
||||
else
|
||||
{
|
||||
$bounce = ''; // By default
|
||||
$additionnalparam = ''; // By default
|
||||
if (! empty($conf->global->MAIN_MAIL_ALLOW_SENDMAIL_F))
|
||||
{
|
||||
// le "Return-Path" (retour des messages bounced) dans les header ne fonctionne pas avec tous les MTA
|
||||
// Le forcage de la valeur grace à l'option -f de sendmail est donc possible si la constante MAIN_MAIL_ALLOW_SENDMAIL_F est definie.
|
||||
// La variable definie pose des pb avec certains sendmail securisee (option -f refusee car dangereuse)
|
||||
$bounce .= ($bounce?' ':'').(! empty($conf->global->MAIN_MAIL_ERRORS_TO) ? '-f' . $this->getValidAddress($conf->global->MAIN_MAIL_ERRORS_TO,2) : ($this->addr_from != '' ? '-f' . $this->getValidAddress($this->addr_from,2) : '') );
|
||||
// Having this variable defined may create problems with some sendmail (option -f refused)
|
||||
// Having this variable not defined may create problems with some other sendmail (option -f required)
|
||||
$additionnalparam .= ($additionnalparam?' ':'').(! empty($conf->global->MAIN_MAIL_ERRORS_TO) ? '-f' . $this->getValidAddress($conf->global->MAIN_MAIL_ERRORS_TO,2) : ($this->addr_from != '' ? '-f' . $this->getValidAddress($this->addr_from,2) : '') );
|
||||
}
|
||||
if (! empty($conf->global->MAIN_MAIL_SENDMAIL_FORCE_BA)) // To force usage of -ba option. This option tells sendmail to read From: or Sender: to setup sender
|
||||
{
|
||||
$bounce .= ($bounce?' ':'').'-ba';
|
||||
$additionnalparam .= ($additionnalparam?' ':'').'-ba';
|
||||
}
|
||||
dol_syslog("CMailFile::sendfile: mail start HOST=".ini_get('SMTP').", PORT=".ini_get('smtp_port').", additionnal_parameters=".$bounce, LOG_DEBUG);
|
||||
if (! empty($conf->global->MAIN_MAIL_SENDMAIL_FORCE_ADDPARAM)) $additionnalparam .= ($additionnalparam?' ':'').'-U '.$additionnalparam; // Use -U to add additionnal params
|
||||
|
||||
dol_syslog("CMailFile::sendfile: mail start HOST=".ini_get('SMTP').", PORT=".ini_get('smtp_port').", additionnal_parameters=".$additionnalparam, LOG_DEBUG);
|
||||
|
||||
$this->message=stripslashes($this->message);
|
||||
|
||||
if (! empty($conf->global->MAIN_MAIL_DEBUG)) $this->dump_mail();
|
||||
|
||||
if (! empty($bounce)) $res = mail($dest,$this->encodetorfc2822($this->subject),$this->message,$this->headers, $bounce);
|
||||
if (! empty($additionnalparam)) $res = mail($dest, $this->encodetorfc2822($this->subject), $this->message, $this->headers, $additionnalparam);
|
||||
else $res = mail($dest, $this->encodetorfc2822($this->subject), $this->message, $this->headers);
|
||||
|
||||
if (! $res)
|
||||
|
||||
@@ -282,6 +282,7 @@ class Conf
|
||||
// Define default dir_output and dir_temp for directories of modules
|
||||
foreach($this->modules as $module)
|
||||
{
|
||||
//var_dump($module);
|
||||
// For multicompany sharings
|
||||
$this->$module->multidir_output = array($this->entity => $rootfordata."/".$module);
|
||||
$this->$module->multidir_temp = array($this->entity => $rootfordata."/".$module."/temp");
|
||||
|
||||
@@ -5633,18 +5633,18 @@ class Form
|
||||
* Return a HTML area with the reference of object and a navigation bar for a business object
|
||||
* To add a particular filter on select, you must set $object->next_prev_filter to SQL criteria.
|
||||
*
|
||||
* @param object $object Object to show
|
||||
* @param string $paramid Name of parameter to use to name the id into the URL next/previous link
|
||||
* @param string $morehtml More html content to output just before the nav bar
|
||||
* @param int $shownav Show Condition (navigation is shown if value is 1)
|
||||
* @param string $fieldid Name of field id into database to use for select next and previous (we make the select max and min on this field)
|
||||
* @param object $object Object to show.
|
||||
* @param string $paramid Name of parameter to use to name the id into the URL next/previous link.
|
||||
* @param string $morehtml More html content to output just before the nav bar.
|
||||
* @param int $shownav Show Condition (navigation is shown if value is 1).
|
||||
* @param string $fieldid Name of field id into database to use for select next and previous (we make the select max and min on this field).
|
||||
* @param string $fieldref Name of field ref of object (object->ref) to show or 'none' to not show ref.
|
||||
* @param string $morehtmlref More html to show after ref
|
||||
* @param string $moreparam More param to add in nav link url.
|
||||
* @param int $nodbprefix Do not include DB prefix to forge table name
|
||||
* @param string $morehtmlleft More html code to show before ref
|
||||
* @param string $morehtmlstatus More html code to show under navigation arrows (status place)
|
||||
* @param string $morehtmlright More html code to show after ref
|
||||
* @param string $morehtmlref More html to show after ref.
|
||||
* @param string $moreparam More param to add in nav link url. Must start with '&...'.
|
||||
* @param int $nodbprefix Do not include DB prefix to forge table name.
|
||||
* @param string $morehtmlleft More html code to show before ref.
|
||||
* @param string $morehtmlstatus More html code to show under navigation arrows (status place).
|
||||
* @param string $morehtmlright More html code to show after ref.
|
||||
* @return string Portion HTML with ref + navigation buttons
|
||||
*/
|
||||
function showrefnav($object,$paramid,$morehtml='',$shownav=1,$fieldid='rowid',$fieldref='ref',$morehtmlref='',$moreparam='',$nodbprefix=0,$morehtmlleft='',$morehtmlstatus='',$morehtmlright='')
|
||||
@@ -5657,7 +5657,7 @@ class Form
|
||||
|
||||
//print "paramid=$paramid,morehtml=$morehtml,shownav=$shownav,$fieldid,$fieldref,$morehtmlref,$moreparam";
|
||||
$object->load_previous_next_ref((isset($object->next_prev_filter)?$object->next_prev_filter:''),$fieldid,$nodbprefix);
|
||||
|
||||
|
||||
//$previous_ref = $object->ref_previous?'<a data-role="button" data-icon="arrow-l" data-iconpos="left" href="'.$_SERVER["PHP_SELF"].'?'.$paramid.'='.urlencode($object->ref_previous).$moreparam.'">'.(empty($conf->dol_use_jmobile)?img_picto($langs->trans("Previous"),'previous.png'):' ').'</a>':'';
|
||||
//$next_ref = $object->ref_next?'<a data-role="button" data-icon="arrow-r" data-iconpos="right" href="'.$_SERVER["PHP_SELF"].'?'.$paramid.'='.urlencode($object->ref_next).$moreparam.'">'.(empty($conf->dol_use_jmobile)?img_picto($langs->trans("Next"),'next.png'):' ').'</a>':'';
|
||||
$previous_ref = $object->ref_previous?'<a data-role="button" data-icon="arrow-l" data-iconpos="left" href="'.$_SERVER["PHP_SELF"].'?'.$paramid.'='.urlencode($object->ref_previous).$moreparam.'">'.(($conf->dol_use_jmobile != 4)?'<':' ').'</a>':'<span class="inactive">'.(($conf->dol_use_jmobile != 4)?'<':' ').'</span>';
|
||||
|
||||
@@ -810,7 +810,7 @@ class DoliDBMysqli extends DoliDB
|
||||
/**
|
||||
* Create a user and privileges to connect to database (even if database does not exists yet)
|
||||
*
|
||||
* @param string $dolibarr_main_db_host Ip serveur
|
||||
* @param string $dolibarr_main_db_host Ip server or '%'
|
||||
* @param string $dolibarr_main_db_user Nom user a creer
|
||||
* @param string $dolibarr_main_db_pass Mot de passe user a creer
|
||||
* @param string $dolibarr_main_db_name Database name where user must be granted
|
||||
|
||||
@@ -239,7 +239,7 @@ function show_array_actions_to_do($max=5)
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("LastActionsToDo",$max).'</td>';
|
||||
print '<td colspan="2" align="right"><a href="'.DOL_URL_ROOT.'/comm/action/listactions.php?status=todo">'.$langs->trans("FullList").'</a>';
|
||||
print '<td colspan="2" align="right"><a class="commonlink" href="'.DOL_URL_ROOT.'/comm/action/listactions.php?status=todo">'.$langs->trans("FullList").'</a>';
|
||||
print '</tr>';
|
||||
|
||||
$var = true;
|
||||
@@ -336,7 +336,7 @@ function show_array_last_actions_done($max=5)
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("LastDoneTasks",$max).'</td>';
|
||||
print '<td colspan="2" align="right"><a href="'.DOL_URL_ROOT.'/comm/action/listactions.php?status=done">'.$langs->trans("FullList").'</a>';
|
||||
print '<td colspan="2" align="right"><a class="commonlink" href="'.DOL_URL_ROOT.'/comm/action/listactions.php?status=done">'.$langs->trans("FullList").'</a>';
|
||||
print '</tr>';
|
||||
$var = true;
|
||||
$i = 0;
|
||||
|
||||
@@ -1071,6 +1071,12 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
||||
if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3) || $conf->browser->layout=='phone') $tmptxt=$object->getLibStatut(5, $object->totalpaye);
|
||||
$morehtmlstatus.=$tmptxt;
|
||||
}
|
||||
elseif ($object->element == 'loan')
|
||||
{
|
||||
$tmptxt=$object->getLibStatut(6, $object->totalpaye);
|
||||
if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3) || $conf->browser->layout=='phone') $tmptxt=$object->getLibStatut(5, $object->totalpaye);
|
||||
$morehtmlstatus.=$tmptxt;
|
||||
}
|
||||
elseif ($object->element == 'contrat')
|
||||
{
|
||||
if ($object->statut==0) $morehtmlstatus.=$object->getLibStatut(2);
|
||||
@@ -1082,7 +1088,8 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
||||
$morehtmlstatus.=$tmptxt;
|
||||
}
|
||||
if (! empty($object->name_alias)) $morehtmlref.='<div class="refidno">'.$object->name_alias.'</div>'; // For thirdparty
|
||||
if (! empty($object->label)) $morehtmlref.='<div class="refidno">'.$object->label.'</div>'; // For product
|
||||
if ($object->element == 'product' && ! empty($object->label)) $morehtmlref.='<div class="refidno">'.$object->label.'</div>';
|
||||
|
||||
if ($object->element != 'product')
|
||||
{
|
||||
$morehtmlref.='<div class="refidno">';
|
||||
@@ -1096,7 +1103,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
||||
$morehtmlref.='</div>';
|
||||
}
|
||||
|
||||
print '<div class="'.($onlybanner?'':'arearef ').'heightref valignmiddle" width="100%">';
|
||||
print '<div class="'.($onlybanner?'arearefnobottom ':'arearef ').'heightref valignmiddle" width="100%">';
|
||||
print $form->showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlstatus, $morehtmlright);
|
||||
print '</div>';
|
||||
print '<div class="underrefbanner clearboth"></div>';
|
||||
|
||||
@@ -2007,13 +2007,14 @@ function getElementProperties($element_type)
|
||||
|
||||
/**
|
||||
* Fetch an object from its id and element_type
|
||||
* Inclusion classes is automatic
|
||||
* Inclusion of classes is automatic
|
||||
*
|
||||
* @param int $element_id Element id
|
||||
* @param string $element_type Element type
|
||||
* @param ref $element_ref Element ref (Use this if element_id but not both)
|
||||
* @return int|object object || 0 || -1 if error
|
||||
*/
|
||||
function fetchObjectByElement($element_id, $element_type)
|
||||
function fetchObjectByElement($element_id, $element_type, $element_ref='')
|
||||
{
|
||||
global $conf;
|
||||
global $db,$conf;
|
||||
@@ -2023,11 +2024,11 @@ function fetchObjectByElement($element_id, $element_type)
|
||||
{
|
||||
dol_include_once('/'.$element_prop['classpath'].'/'.$element_prop['classfile'].'.class.php');
|
||||
|
||||
$objectstat = new $element_prop['classname']($db);
|
||||
$ret = $objectstat->fetch($element_id);
|
||||
$objecttmp = new $element_prop['classname']($db);
|
||||
$ret = $objecttmp->fetch($element_id, $element_ref);
|
||||
if ($ret >= 0)
|
||||
{
|
||||
return $objectstat;
|
||||
return $objecttmp;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -844,7 +844,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
if (! empty($conf->commande->enabled))
|
||||
{
|
||||
$langs->load("orders");
|
||||
if (! empty($conf->facture->enabled)) $newmenu->add("/commande/list.php?leftmenu=orders&viewstatut=-3&billed=0", $langs->trans("MenuOrdersToBill2"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders');
|
||||
if (! empty($conf->facture->enabled)) $newmenu->add("/commande/list.php?leftmenu=orders&viewstatut=-3&billed=0&contextpage=billableorders", $langs->trans("MenuOrdersToBill2"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders');
|
||||
// if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/", $langs->trans("StatusOrderToBill"), 1, $user->rights->commande->lire);
|
||||
}
|
||||
|
||||
|
||||
@@ -129,6 +129,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$this->posxtva-=20;
|
||||
$this->posxup-=20;
|
||||
$this->posxqty-=20;
|
||||
$this->posxunit-=20;
|
||||
$this->posxdiscount-=20;
|
||||
$this->postotalht-=20;
|
||||
}
|
||||
|
||||
@@ -135,12 +135,14 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$this->posxpicture=$this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH)?20:$conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images
|
||||
if ($this->page_largeur < 210) // To work with US executive format
|
||||
{
|
||||
$this->posxpicture-=20;
|
||||
$this->posxtva-=20;
|
||||
$this->posxup-=20;
|
||||
$this->posxqty-=20;
|
||||
$this->posxdiscount-=20;
|
||||
$this->postotalht-=20;
|
||||
$this->posxpicture-=20;
|
||||
$this->posxtva-=20;
|
||||
$this->posxup-=20;
|
||||
$this->posxqty-=20;
|
||||
$this->posxunit-=20;
|
||||
$this->posxdiscount-=20;
|
||||
$this->posxprogress-=20;
|
||||
$this->postotalht-=20;
|
||||
}
|
||||
|
||||
$this->tva=array();
|
||||
@@ -297,7 +299,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$this->atleastonediscount++;
|
||||
}
|
||||
}
|
||||
if (empty($this->atleastonediscount) && empty($conf->global->PRODUCT_USE_UNITS))
|
||||
if (empty($this->atleastonediscount) && empty($conf->global->PRODUCT_USE_UNITS)) // retreive space not used by discount
|
||||
{
|
||||
$this->posxpicture+=($this->postotalht - $this->posxdiscount);
|
||||
$this->posxtva+=($this->postotalht - $this->posxdiscount);
|
||||
@@ -527,9 +529,9 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$pdf->MultiCell($this->posxprogress-$this->posxdiscount+2, 3, $remise_percent, 0, 'R');
|
||||
}
|
||||
|
||||
// Situation progress
|
||||
if ($this->situationinvoice)
|
||||
{
|
||||
// Situation progress
|
||||
$progress = pdf_getlineprogress($object, $i, $outputlangs, $hidedetails);
|
||||
$pdf->SetXY($this->posxprogress, $curY);
|
||||
$pdf->MultiCell($this->postotalht-$this->posxprogress, 3, $progress, 0, 'R');
|
||||
|
||||
@@ -44,12 +44,12 @@ class ModeleImports
|
||||
public $version_lib; // Version of external lib used by driver
|
||||
|
||||
// Array of all drivers
|
||||
public $_driverlabel=array();
|
||||
public $_driverdesc=array();
|
||||
public $_driverversion=array();
|
||||
public $driverlabel=array();
|
||||
public $driverdesc=array();
|
||||
public $driverversion=array();
|
||||
|
||||
public $_liblabel=array();
|
||||
public $_libversion=array();
|
||||
public $liblabel=array();
|
||||
public $libversion=array();
|
||||
|
||||
|
||||
/**
|
||||
@@ -166,19 +166,19 @@ class ModeleImports
|
||||
// Picto
|
||||
$this->picto[$module->id]=$module->picto;
|
||||
// Driver properties
|
||||
$this->_driverlabel[$module->id]=$module->getDriverLabel('');
|
||||
$this->_driverdesc[$module->id]=$module->getDriverDesc('');
|
||||
$this->_driverversion[$module->id]=$module->getDriverVersion('');
|
||||
$this->driverlabel[$module->id]=$module->getDriverLabel('');
|
||||
$this->driverdesc[$module->id]=$module->getDriverDesc('');
|
||||
$this->driverversion[$module->id]=$module->getDriverVersion('');
|
||||
// If use an external lib
|
||||
$this->_liblabel[$module->id]=$module->getLibLabel('');
|
||||
$this->_libversion[$module->id]=$module->getLibVersion('');
|
||||
$this->liblabel[$module->id]=$module->getLibLabel('');
|
||||
$this->libversion[$module->id]=$module->getLibVersion('');
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return array_keys($this->_driverlabel);
|
||||
return array_keys($this->driverlabel);
|
||||
}
|
||||
|
||||
|
||||
@@ -201,7 +201,7 @@ class ModeleImports
|
||||
*/
|
||||
function getDriverLabelForKey($key)
|
||||
{
|
||||
return $this->_driverlabel[$key];
|
||||
return $this->driverlabel[$key];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -212,7 +212,7 @@ class ModeleImports
|
||||
*/
|
||||
function getDriverDescForKey($key)
|
||||
{
|
||||
return $this->_driverdesc[$key];
|
||||
return $this->driverdesc[$key];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -223,7 +223,7 @@ class ModeleImports
|
||||
*/
|
||||
function getDriverVersionForKey($key)
|
||||
{
|
||||
return $this->_driverversion[$key];
|
||||
return $this->driverversion[$key];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -234,7 +234,7 @@ class ModeleImports
|
||||
*/
|
||||
function getLibLabelForKey($key)
|
||||
{
|
||||
return $this->_liblabel[$key];
|
||||
return $this->liblabel[$key];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -245,7 +245,7 @@ class ModeleImports
|
||||
*/
|
||||
function getLibVersionForKey($key)
|
||||
{
|
||||
return $this->_libversion[$key];
|
||||
return $this->libversion[$key];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -287,12 +287,12 @@ class modFournisseur extends DolibarrModules
|
||||
$this->export_label[$r]='Factures fournisseurs et lignes de facture';
|
||||
$this->export_icon[$r]='bill';
|
||||
$this->export_permission[$r]=array(array("fournisseur","facture","export"));
|
||||
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.ref'=>"InvoiceRef",'f.ref_supplier'=>"RefSupplier",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note_public'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.remise_percent'=>"Discount",'fd.total_ht'=>"LineTotalHT",'fd.total_ttc'=>"LineTotalTTC",'fd.tva'=>"LineTotalVAT",'fd.product_type'=>'TypeOfLineServiceOrProduct','fd.fk_product'=>'ProductId',
|
||||
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.ref'=>"InvoiceRef",'f.ref_supplier'=>"RefSupplier",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>'DateMaxPayment','f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note_public'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.remise_percent'=>"Discount",'fd.total_ht'=>"LineTotalHT",'fd.total_ttc'=>"LineTotalTTC",'fd.tva'=>"LineTotalVAT",'fd.product_type'=>'TypeOfLineServiceOrProduct','fd.fk_product'=>'ProductId',
|
||||
'p.ref'=>'ProductRef','p.label'=>'ProductLabel','p.accountancy_code_buy'=>'ProductAccountancyBuyCode','project.rowid'=>'ProjectId','project.ref'=>'ProjectRef','project.title'=>'ProjectLabel');
|
||||
//$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:CompanyName",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.ref'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Numeric",'f.total_ttc'=>"Numeric",'f.total_tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_public'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Text",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.tva'=>"Numeric",'fd.product_type'=>'Numeric','fd.fk_product'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text');
|
||||
$this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.ref'=>"Text",'f.ref_supplier'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Numeric",'f.total_ttc'=>"Numeric",'f.total_tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_public'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Text",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.tva'=>"Numeric",'fd.product_type'=>'Numeric','fd.fk_product'=>'List:product:label',
|
||||
$this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.ref'=>"Text",'f.ref_supplier'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>'Date','f.total_ht'=>"Numeric",'f.total_ttc'=>"Numeric",'f.total_tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_public'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Text",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.tva'=>"Numeric",'fd.product_type'=>'Numeric','fd.fk_product'=>'List:product:label',
|
||||
'p.ref'=>'Text','p.label'=>'Text','project.ref'=>'Text','project.title'=>'Text');
|
||||
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.ref'=>"invoice",'f.ref_supplier'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note_public'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.remise_percent'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva'=>"invoice_line",'fd.product_type'=>'invoice_line','fd.fk_product'=>'product',
|
||||
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.ref'=>"invoice",'f.ref_supplier'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>'invoice','f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note_public'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.remise_percent'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva'=>"invoice_line",'fd.product_type'=>'invoice_line','fd.fk_product'=>'product',
|
||||
'p.ref'=>'product','p.label'=>'product','p.accountancy_code_buy'=>'product','project.rowid'=>'project','project.ref'=>'project','project.title'=>'project');
|
||||
$this->export_dependencies_array[$r]=array('invoice_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
|
||||
// Add extra fields object
|
||||
|
||||
@@ -127,6 +127,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
$this->posxtva-=20;
|
||||
$this->posxup-=20;
|
||||
$this->posxqty-=20;
|
||||
$this->posxunit-=20;
|
||||
$this->posxdiscount-=20;
|
||||
$this->postotalht-=20;
|
||||
}
|
||||
|
||||
@@ -113,6 +113,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$this->posxtva-=20;
|
||||
$this->posxup-=20;
|
||||
$this->posxqty-=20;
|
||||
$this->posxunit-=20;
|
||||
$this->posxdiscount-=20;
|
||||
$this->postotalht-=20;
|
||||
}
|
||||
|
||||
@@ -127,6 +127,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$this->posxtva-=20;
|
||||
$this->posxup-=20;
|
||||
$this->posxqty-=20;
|
||||
$this->posxunit-=20;
|
||||
$this->posxdiscount-=20;
|
||||
$this->postotalht-=20;
|
||||
}
|
||||
|
||||
@@ -115,6 +115,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
||||
$this->posxtva-=20;
|
||||
$this->posxup-=20;
|
||||
$this->posxqty-=20;
|
||||
$this->posxunit-=20;
|
||||
$this->posxdiscount-=20;
|
||||
$this->postotalht-=20;
|
||||
}
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
*
|
||||
* $cols
|
||||
*/
|
||||
?>
|
||||
<!-- BEGIN PHP TEMPLATE admin_extrafields_view.tpl.php -->
|
||||
<?php
|
||||
|
||||
//$res = $object->fetch_optionals($object->id, $extralabels);
|
||||
$parameters = array('colspan' => ' colspan="'.$cols.'"', 'cols' => $cols, 'socid' => $object->fk_soc);
|
||||
@@ -47,7 +50,9 @@ if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
if (!empty($extrafields->attribute_hidden[$key])) print '<tr class="hideobject"><td>';
|
||||
else print '<tr><td>';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td';
|
||||
print '<table width="100%" class="nobordernopadding">';
|
||||
print '<tr>';
|
||||
print '<td';
|
||||
//var_dump($action);exit;
|
||||
if ((! empty($action) && ($action == 'create' || $action == 'edit')) && ! empty($extrafields->attribute_required[$key])) print ' class="fieldrequired"';
|
||||
print '>' . $langs->trans($label) . '</td>';
|
||||
@@ -100,3 +105,5 @@ if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<!-- END PHP TEMPLATE admin_extrafields_view.tpl.php -->
|
||||
@@ -10,21 +10,21 @@ print '<div class="tagtable centpercent noborder allwidth">';
|
||||
if($mode == 'edit' )
|
||||
{
|
||||
print '<form class="tagtr liste_titre">';
|
||||
print '<div class="tagtd">'.$langs->trans('Resource').'</div>';
|
||||
print '<div class="tagtd">'.$langs->trans('Type').'</div>';
|
||||
print '<div class="tagtd" align="center">'.$langs->trans('Busy').'</div>';
|
||||
print '<div class="tagtd" align="center">'.$langs->trans('Mandatory').'</div>';
|
||||
print '<div class="tagtd"></div>';
|
||||
print '<div class="tagtd liste_titre">'.$langs->trans('Resource').'</div>';
|
||||
print '<div class="tagtd liste_titre">'.$langs->trans('Type').'</div>';
|
||||
print '<div class="tagtd liste_titre" align="center">'.$langs->trans('Busy').'</div>';
|
||||
print '<div class="tagtd liste_titre" align="center">'.$langs->trans('Mandatory').'</div>';
|
||||
print '<div class="tagtd liste_titre"></div>';
|
||||
print '</form>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<form class="tagtr liste_titre">';
|
||||
print '<div class="tagtd">'.$langs->trans('Resource').'</div>';
|
||||
print '<div class="tagtd">'.$langs->trans('Type').'</div>';
|
||||
print '<div class="tagtd" align="center">'.$langs->trans('Busy').'</div>';
|
||||
print '<div class="tagtd" align="center">'.$langs->trans('Mandatory').'</div>';
|
||||
print '<div class="tagtd"></div>';
|
||||
print '<div class="tagtd liste_titre">'.$langs->trans('Resource').'</div>';
|
||||
print '<div class="tagtd liste_titre">'.$langs->trans('Type').'</div>';
|
||||
print '<div class="tagtd liste_titre" align="center">'.$langs->trans('Busy').'</div>';
|
||||
print '<div class="tagtd liste_titre" align="center">'.$langs->trans('Mandatory').'</div>';
|
||||
print '<div class="tagtd liste_titre"></div>';
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ if( (array) $linked_resources && count($linked_resources) > 0)
|
||||
|
||||
print '<div class="tagtd">';
|
||||
print $object_resource->getNomUrl(1);
|
||||
print '</div class="tagtd">';
|
||||
print '</div>';
|
||||
|
||||
print '<div class="tagtd">';
|
||||
print $object_resource->type_label;
|
||||
|
||||
Reference in New Issue
Block a user