Merge remote-tracking branch 'Dolibarr/13.0' into 13
This commit is contained in:
commit
2ff471f35e
@ -55,6 +55,7 @@ FIX: status late on purchase orders
|
||||
FIX: ODT generation very slow
|
||||
FIX: amount in summary of report
|
||||
FIX: vat value when code contains number
|
||||
FIX: payment term label on PDF
|
||||
|
||||
|
||||
***** ChangeLog for 13.0.0 compared to 12.0.0 *****
|
||||
|
||||
@ -3247,6 +3247,7 @@ class Commande extends CommonOrder
|
||||
if (isset($this->note_public)) $this->note_public = trim($this->note_public);
|
||||
if (isset($this->model_pdf)) $this->model_pdf = trim($this->model_pdf);
|
||||
if (isset($this->import_key)) $this->import_key = trim($this->import_key);
|
||||
$delivery_date = empty($this->delivery_date) ? $this->date_livraison : $this->delivery_date;
|
||||
|
||||
// Check parameters
|
||||
// Put here code to add control on parameters values
|
||||
@ -3271,6 +3272,8 @@ class Commande extends CommonOrder
|
||||
$sql .= " fk_projet=".(isset($this->fk_project) ? $this->fk_project : "null").",";
|
||||
$sql .= " fk_cond_reglement=".(isset($this->cond_reglement_id) ? $this->cond_reglement_id : "null").",";
|
||||
$sql .= " fk_mode_reglement=".(isset($this->mode_reglement_id) ? $this->mode_reglement_id : "null").",";
|
||||
$sql .= " date_livraison=".(strval($this->delivery_date) != '' ? "'".$this->db->idate($this->delivery_date)."'" : 'null').",";
|
||||
$sql .= " fk_shipping_method=".(isset($this->shipping_method_id) ? $this->shipping_method_id : "null").",";
|
||||
$sql .= " fk_account=".($this->fk_account > 0 ? $this->fk_account : "null").",";
|
||||
$sql .= " fk_input_reason=".($this->demand_reason_id > 0 ? $this->demand_reason_id : "null").",";
|
||||
$sql .= " note_private=".(isset($this->note_private) ? "'".$this->db->escape($this->note_private)."'" : "null").",";
|
||||
|
||||
@ -58,6 +58,10 @@ $search_accountancy_account = GETPOST("search_accountancy_account");
|
||||
if ($search_accountancy_account == - 1) $search_accountancy_account = '';
|
||||
$search_accountancy_subledger = GETPOST("search_accountancy_subledger");
|
||||
if ($search_accountancy_subledger == - 1) $search_accountancy_subledger = '';
|
||||
if (empty($search_datep_start)) $search_datep_start = GETPOST("search_datep_start", 'int');
|
||||
if (empty($search_datep_end)) $search_datep_end = GETPOST("search_datep_end", 'int');
|
||||
if (empty($search_datev_start)) $search_datev_start = GETPOST("search_datev_start", 'int');
|
||||
if (empty($search_datev_end)) $search_datev_end = GETPOST("search_datev_end", 'int');
|
||||
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
$sortorder = GETPOST("sortorder", 'alpha');
|
||||
|
||||
@ -883,8 +883,8 @@ if (empty($reshook))
|
||||
$action = 'editref';
|
||||
} else {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
$old_filedir = $conf->contrat->dir_output.'/'.dol_sanitizeFileName($old_ref);
|
||||
$new_filedir = $conf->contrat->dir_output.'/'.dol_sanitizeFileName($object->ref);
|
||||
$old_filedir = $conf->contrat->multidir_output[$object->entity].'/'.dol_sanitizeFileName($old_ref);
|
||||
$new_filedir = $conf->contrat->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref);
|
||||
|
||||
$files = dol_dir_list($old_filedir);
|
||||
if (!empty($files))
|
||||
@ -929,7 +929,7 @@ if (empty($reshook))
|
||||
|
||||
|
||||
// Actions to build doc
|
||||
$upload_dir = $conf->contrat->dir_output;
|
||||
$upload_dir = $conf->contrat->multidir_output[$object->entity];
|
||||
$permissiontoadd = $user->rights->contrat->creer;
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
|
||||
|
||||
@ -2131,13 +2131,13 @@ if ($action == 'create')
|
||||
* Documents generes
|
||||
*/
|
||||
$filename = dol_sanitizeFileName($object->ref);
|
||||
$filedir = $conf->contrat->dir_output."/".dol_sanitizeFileName($object->ref);
|
||||
$filedir = $conf->contrat->multidir_output[$object->entity]."/".dol_sanitizeFileName($object->ref);
|
||||
$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
|
||||
$genallowed = $user->rights->contrat->lire;
|
||||
$delallowed = $user->rights->contrat->creer;
|
||||
|
||||
|
||||
print $formfile->showdocuments('contract', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang);
|
||||
print $formfile->showdocuments('contract', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang, '', $object);
|
||||
|
||||
|
||||
// Show links to link elements
|
||||
@ -2162,7 +2162,7 @@ if ($action == 'create')
|
||||
// Presend form
|
||||
$modelmail = 'contract';
|
||||
$defaulttopic = 'SendContractRef';
|
||||
$diroutput = $conf->contrat->dir_output;
|
||||
$diroutput = $conf->contrat->multidir_output[$object->entity];
|
||||
$trackid = 'con'.$object->id;
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php';
|
||||
|
||||
@ -1296,7 +1296,7 @@ class Contrat extends CommonObject
|
||||
$ref = dol_sanitizeFileName($this->ref);
|
||||
if ($conf->contrat->dir_output)
|
||||
{
|
||||
$dir = $conf->contrat->dir_output."/".$ref;
|
||||
$dir = $conf->contrat->multidir_output[$this->entity]."/".$ref;
|
||||
if (file_exists($dir))
|
||||
{
|
||||
$res = @dol_delete_dir_recursive($dir);
|
||||
|
||||
@ -74,7 +74,7 @@ if ($object->id > 0)
|
||||
$object->fetch_thirdparty();
|
||||
}
|
||||
|
||||
$upload_dir = $conf->contrat->dir_output.'/'.dol_sanitizeFileName($object->ref);
|
||||
$upload_dir = $conf->contrat->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref);
|
||||
$modulepart = 'contract';
|
||||
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
|
||||
@ -201,7 +201,7 @@ $socstatic = new Societe($db);
|
||||
$contracttmp = new Contrat($db);
|
||||
|
||||
$sql = 'SELECT';
|
||||
$sql .= " c.rowid, c.ref, c.datec as date_creation, c.tms as date_update, c.date_contrat, c.statut, c.ref_customer, c.ref_supplier, c.note_private, c.note_public,";
|
||||
$sql .= " c.rowid, c.ref, c.datec as date_creation, c.tms as date_update, c.date_contrat, c.statut, c.ref_customer, c.ref_supplier, c.note_private, c.note_public, c.entity";
|
||||
$sql .= ' s.rowid as socid, s.nom as name, s.name_alias, s.email, s.town, s.zip, s.fk_pays as country_id, s.client, s.code_client, s.status as company_status, s.logo as company_logo,';
|
||||
$sql .= " typent.code as typent_code,";
|
||||
$sql .= " state.code_departement as state_code, state.nom as state_name,";
|
||||
@ -256,7 +256,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook
|
||||
$sql .= $hookmanager->resPrint;
|
||||
$sql .= " GROUP BY c.rowid, c.ref, c.datec, c.tms, c.date_contrat, c.statut, c.ref_customer, c.ref_supplier, c.note_private, c.note_public,";
|
||||
$sql .= " GROUP BY c.rowid, c.ref, c.datec, c.tms, c.date_contrat, c.statut, c.ref_customer, c.ref_supplier, c.note_private, c.note_public, c.entity,";
|
||||
$sql .= ' s.rowid, s.nom, s.name_alias, s.email, s.town, s.zip, s.fk_pays, s.client, s.code_client, s.status, s.logo,';
|
||||
$sql .= " typent.code,";
|
||||
$sql .= " state.code_departement, state.nom";
|
||||
@ -640,7 +640,7 @@ while ($i < min($num, $limit))
|
||||
}
|
||||
|
||||
$filename = dol_sanitizeFileName($obj->ref);
|
||||
$filedir = $conf->contrat->dir_output.'/'.dol_sanitizeFileName($obj->ref);
|
||||
$filedir = $conf->contrat->multidir_output[$obj->entity].'/'.dol_sanitizeFileName($obj->ref);
|
||||
$urlsource = $_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||
print $formfile->getDocumentsLink($contracttmp->element, $filename, $filedir);
|
||||
print '</td>';
|
||||
|
||||
@ -70,7 +70,7 @@ function contract_prepare_head(Contrat $object)
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php';
|
||||
$upload_dir = $conf->contrat->dir_output."/".dol_sanitizeFileName($object->ref);
|
||||
$upload_dir = $conf->contrat->multidir_output[$object->entity]."/".dol_sanitizeFileName($object->ref);
|
||||
$nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
|
||||
$nbLinks = Link::count($db, $object->element, $object->id);
|
||||
$head[$h][0] = DOL_URL_ROOT.'/contrat/document.php?id='.$object->id;
|
||||
|
||||
@ -2316,10 +2316,10 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
|
||||
if ($fuser->rights->ficheinter->{$lire}) $accessallowed = 1;
|
||||
$original_file = $conf->ficheinter->dir_output.'/'.$original_file;
|
||||
} // Wrapping pour les apercu conat
|
||||
elseif (($modulepart == 'apercucontract') && !empty($conf->contrat->dir_output))
|
||||
elseif (($modulepart == 'apercucontract') && !empty($conf->contrat->multidir_output[$entity]))
|
||||
{
|
||||
if ($fuser->rights->contrat->{$lire}) $accessallowed = 1;
|
||||
$original_file = $conf->contrat->dir_output.'/'.$original_file;
|
||||
$original_file = $conf->contrat->multidir_output[$entity].'/'.$original_file;
|
||||
} // Wrapping pour les apercu supplier proposal
|
||||
elseif (($modulepart == 'apercusupplier_proposal' || $modulepart == 'apercusupplier_proposal') && !empty($conf->supplier_proposal->dir_output))
|
||||
{
|
||||
@ -2709,13 +2709,13 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
|
||||
}
|
||||
if (!empty($conf->stock->enabled)) $original_file = $conf->stock->multidir_output[$entity].'/movement/'.$original_file;
|
||||
} // Wrapping pour les contrats
|
||||
elseif ($modulepart == 'contract' && !empty($conf->contrat->dir_output))
|
||||
elseif ($modulepart == 'contract' && !empty($conf->contrat->multidir_output[$entity]))
|
||||
{
|
||||
if ($fuser->rights->contrat->{$lire} || preg_match('/^specimen/i', $original_file))
|
||||
{
|
||||
$accessallowed = 1;
|
||||
}
|
||||
$original_file = $conf->contrat->dir_output.'/'.$original_file;
|
||||
$original_file = $conf->contrat->multidir_output[$entity].'/'.$original_file;
|
||||
$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."contrat WHERE ref='".$db->escape($refname)."' AND entity IN (".getEntity('contract').")";
|
||||
} // Wrapping pour les dons
|
||||
elseif ($modulepart == 'donation' && !empty($conf->don->dir_output))
|
||||
|
||||
@ -707,7 +707,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posxval, $posy);
|
||||
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc);
|
||||
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
|
||||
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
|
||||
$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
|
||||
|
||||
|
||||
@ -925,7 +925,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posxval, $posy);
|
||||
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc);
|
||||
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
|
||||
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
|
||||
$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
|
||||
|
||||
|
||||
@ -219,7 +219,7 @@ class doc_generic_contract_odt extends ModelePDFContract
|
||||
// Load traductions files required by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills"));
|
||||
|
||||
if ($conf->contrat->dir_output)
|
||||
if ($conf->contrat->multidir_output[$object->entity])
|
||||
{
|
||||
// If $object is id instead of object
|
||||
if (!is_object($object))
|
||||
@ -236,7 +236,7 @@ class doc_generic_contract_odt extends ModelePDFContract
|
||||
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
$dir = $conf->contrat->dir_output;
|
||||
$dir = $conf->contrat->multidir_output[$object->entity];
|
||||
$objectref = dol_sanitizeFileName($object->ref);
|
||||
if (!preg_match('/specimen/i', $objectref)) $dir .= "/".$objectref;
|
||||
$file = $dir."/".$objectref.".odt";
|
||||
|
||||
@ -195,7 +195,7 @@ class pdf_strato extends ModelePDFContract
|
||||
$file = $dir."/SPECIMEN.pdf";
|
||||
} else {
|
||||
$objectref = dol_sanitizeFileName($object->ref);
|
||||
$dir = $conf->contrat->dir_output."/".$objectref;
|
||||
$dir = $conf->contrat->multidir_output[$object->entity]."/".$objectref;
|
||||
$file = $dir."/".$objectref.".pdf";
|
||||
}
|
||||
|
||||
|
||||
@ -1004,7 +1004,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posxval, $posy);
|
||||
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc);
|
||||
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
|
||||
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
|
||||
$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
|
||||
|
||||
|
||||
@ -1108,7 +1108,7 @@ class pdf_sponge extends ModelePDFFactures
|
||||
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posxval, $posy);
|
||||
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc);
|
||||
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
|
||||
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
|
||||
$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
|
||||
|
||||
|
||||
@ -909,7 +909,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posxval, $posy);
|
||||
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc);
|
||||
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
|
||||
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
|
||||
$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
|
||||
|
||||
|
||||
@ -1048,7 +1048,7 @@ class pdf_cyan extends ModelePDFPropales
|
||||
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posxval, $posy);
|
||||
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc);
|
||||
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
|
||||
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
|
||||
$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
|
||||
|
||||
|
||||
@ -859,7 +859,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
||||
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posxval, $posy);
|
||||
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement);
|
||||
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
|
||||
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
|
||||
$pdf->MultiCell(80, 4, $lib_condition_paiement, 0, 'L');
|
||||
|
||||
|
||||
@ -741,7 +741,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posxval, $posy);
|
||||
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_id);
|
||||
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
|
||||
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
|
||||
$pdf->MultiCell(80, 4, $lib_condition_paiement, 0, 'L');
|
||||
|
||||
|
||||
@ -801,7 +801,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
||||
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posxval, $posy);
|
||||
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc);
|
||||
$lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label);
|
||||
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
|
||||
$pdf->MultiCell(80, 4, $lib_condition_paiement, 0, 'L');
|
||||
|
||||
|
||||
@ -139,6 +139,8 @@ class CommandeFournisseur extends CommonOrder
|
||||
|
||||
public $cond_reglement_id;
|
||||
public $cond_reglement_code;
|
||||
public $cond_reglement_label; // Label
|
||||
public $cond_reglement_doc; // Label on documents
|
||||
|
||||
/**
|
||||
* @var int ID
|
||||
@ -312,7 +314,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
$sql .= " c.note_private, c.note_public, c.model_pdf, c.extraparams, c.billed,";
|
||||
$sql .= " c.fk_multicurrency, c.multicurrency_code, c.multicurrency_tx, c.multicurrency_total_ht, c.multicurrency_total_tva, c.multicurrency_total_ttc,";
|
||||
$sql .= " cm.libelle as methode_commande,";
|
||||
$sql .= " cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle, cr.libelle_facture as cond_reglement_libelle_doc,";
|
||||
$sql .= " cr.code as cond_reglement_code, cr.libelle as cond_reglement_label, cr.libelle_facture as cond_reglement_doc,";
|
||||
$sql .= " p.code as mode_reglement_code, p.libelle as mode_reglement_libelle";
|
||||
$sql .= ', c.fk_incoterms, c.location_incoterms';
|
||||
$sql .= ', i.libelle as label_incoterms';
|
||||
@ -373,8 +375,9 @@ class CommandeFournisseur extends CommonOrder
|
||||
$this->fk_project = $obj->fk_project;
|
||||
$this->cond_reglement_id = $obj->fk_cond_reglement;
|
||||
$this->cond_reglement_code = $obj->cond_reglement_code;
|
||||
$this->cond_reglement = $obj->cond_reglement_libelle;
|
||||
$this->cond_reglement_doc = $obj->cond_reglement_libelle_doc;
|
||||
$this->cond_reglement = $obj->cond_reglement_label; // deprecated
|
||||
$this->cond_reglement_label = $obj->cond_reglement_label;
|
||||
$this->cond_reglement_doc = $obj->cond_reglement_doc;
|
||||
$this->fk_account = $obj->fk_account;
|
||||
$this->mode_reglement_id = $obj->fk_mode_reglement;
|
||||
$this->mode_reglement_code = $obj->mode_reglement_code;
|
||||
|
||||
@ -176,8 +176,11 @@ class FactureFournisseur extends CommonInvoice
|
||||
public $note_private;
|
||||
public $note_public;
|
||||
public $propalid;
|
||||
|
||||
public $cond_reglement_id;
|
||||
public $cond_reglement_code;
|
||||
public $cond_reglement_label;
|
||||
public $cond_reglement_doc;
|
||||
|
||||
/**
|
||||
* @var int ID
|
||||
@ -641,8 +644,8 @@ class FactureFournisseur extends CommonInvoice
|
||||
$sql .= " t.model_pdf,";
|
||||
$sql .= " t.import_key,";
|
||||
$sql .= " t.extraparams,";
|
||||
$sql .= " cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle,";
|
||||
$sql .= " p.code as mode_reglement_code, p.libelle as mode_reglement_libelle,";
|
||||
$sql .= " cr.code as cond_reglement_code, cr.libelle as cond_reglement_label, cr.libelle_facture as cond_reglement_doc,";
|
||||
$sql .= " p.code as mode_reglement_code, p.libelle as mode_reglement_label,";
|
||||
$sql .= ' s.nom as socnom, s.rowid as socid,';
|
||||
$sql .= ' t.fk_incoterms, t.location_incoterms,';
|
||||
$sql .= " i.libelle as label_incoterms,";
|
||||
@ -697,12 +700,13 @@ class FactureFournisseur extends CommonInvoice
|
||||
$this->fk_project = $obj->fk_project;
|
||||
$this->cond_reglement_id = $obj->fk_cond_reglement;
|
||||
$this->cond_reglement_code = $obj->cond_reglement_code;
|
||||
$this->cond_reglement = $obj->cond_reglement_libelle;
|
||||
$this->cond_reglement_doc = $obj->cond_reglement_libelle;
|
||||
$this->cond_reglement = $obj->cond_reglement_label; // deprecated
|
||||
$this->cond_reglement_label = $obj->cond_reglement_label;
|
||||
$this->cond_reglement_doc = $obj->cond_reglement_doc;
|
||||
$this->fk_account = $obj->fk_account;
|
||||
$this->mode_reglement_id = $obj->fk_mode_reglement;
|
||||
$this->mode_reglement_code = $obj->mode_reglement_code;
|
||||
$this->mode_reglement = $obj->mode_reglement_libelle;
|
||||
$this->mode_reglement = $obj->mode_reglement_label;
|
||||
$this->date_echeance = $this->db->jdate($obj->date_lim_reglement);
|
||||
$this->note = $obj->note_private; // deprecated
|
||||
$this->note_private = $obj->note_private;
|
||||
|
||||
@ -73,6 +73,7 @@ INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'XCD'
|
||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'EGP', '[163]', 1, 'Egypt Pound');
|
||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'SVC', '[36]', 1, 'El Salvador Colon');
|
||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'EEK', '[107,114]', 1, 'Estonia Kroon');
|
||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'ETB', NULL, 1, 'Ethiopian Birr');
|
||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'EUR', '[8364]', 1, 'Euro Member Countries');
|
||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'FKP', '[163]', 1, 'Falkland Islands (Malvinas) Pound');
|
||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'FJD', '[36]', 1, 'Fiji Dollar');
|
||||
|
||||
@ -223,7 +223,7 @@ if ($ok && GETPOST('standard', 'alpha'))
|
||||
{
|
||||
$extrafields = new ExtraFields($db);
|
||||
$listofmodulesextra = array('societe'=>'societe', 'adherent'=>'adherent', 'product'=>'product',
|
||||
'socpeople'=>'socpeople', 'commande'=>'commande', 'facture'=>'facture',
|
||||
'socpeople'=>'socpeople', 'propal'=>'propal', 'commande'=>'commande', 'facture'=>'facture',
|
||||
'supplier_proposal'=>'supplier_proposal', 'commande_fournisseur'=>'commande_fournisseur', 'facture_fourn'=>'facture_fourn',
|
||||
'actioncomm'=>'actioncomm', 'bom_bom'=>'bom_bom', 'mrp_mo'=>'mrp_mo',
|
||||
'adherent_type'=>'adherent_type', 'user'=>'user', 'projet'=>'projet', 'projet_task'=>'projet_task');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user