Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
bbd1257222
@ -28,12 +28,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
$langs->load("admin");
|
||||
$langs->load("accountancy");
|
||||
$langs->load("salaries");
|
||||
$langs->loadLangs(array("compta","bills","admin","accountancy","salaries"));
|
||||
|
||||
$mesg = '';
|
||||
$action = GETPOST('action','aZ09');
|
||||
|
||||
@ -880,7 +880,7 @@ if ($id)
|
||||
$valuetoshow=price($valuetoshow);
|
||||
}
|
||||
else if ($fieldlist[$field]=='libelle_facture') {
|
||||
$langs->load("bills");
|
||||
$langs->loadLangs(array("bills"));
|
||||
$key=$langs->trans("PaymentCondition".strtoupper($obj->code));
|
||||
$valuetoshow=($obj->code && $key != "PaymentCondition".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
$valuetoshow=nl2br($valuetoshow);
|
||||
@ -890,7 +890,7 @@ if ($id)
|
||||
$valuetoshow=($obj->code && $key != "Country".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_availability') {
|
||||
$langs->load("propal");
|
||||
$langs->loadLangs(array("propal"));
|
||||
$key=$langs->trans("AvailabilityType".strtoupper($obj->code));
|
||||
$valuetoshow=($obj->code && $key != "AvailabilityType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
@ -915,17 +915,17 @@ if ($id)
|
||||
$valuetoshow=($obj->code && $key != "Civility".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_type_contact') {
|
||||
$langs->load('agenda');
|
||||
$langs->loadLangs(array("agenda"));
|
||||
$key=$langs->trans("TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code));
|
||||
$valuetoshow=($obj->code && $key != "TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_payment_term') {
|
||||
$langs->load("bills");
|
||||
$langs->loadLangs(array("bills"));
|
||||
$key=$langs->trans("PaymentConditionShort".strtoupper($obj->code));
|
||||
$valuetoshow=($obj->code && $key != "PaymentConditionShort".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_paiement') {
|
||||
$langs->load("bills");
|
||||
$langs->loadLangs(array("bills"));
|
||||
$key=$langs->trans("PaymentType".strtoupper($obj->code));
|
||||
$valuetoshow=($obj->code && $key != "PaymentType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
@ -934,12 +934,12 @@ if ($id)
|
||||
$valuetoshow=($obj->code && $key != "DemandReasonType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_input_method') {
|
||||
$langs->load("orders");
|
||||
$langs->loadLangs(array("orders"));
|
||||
$key=$langs->trans($obj->code);
|
||||
$valuetoshow=($obj->code && $key != $obj->code)?$key:$obj->{$fieldlist[$field]};
|
||||
}
|
||||
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_shipment_mode') {
|
||||
$langs->load("sendings");
|
||||
$langs->loadLangs(array("sendings"));
|
||||
$key=$langs->trans("SendingMethod".strtoupper($obj->code));
|
||||
$valuetoshow=($obj->code && $key != "SendingMethod".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
@ -950,7 +950,7 @@ if ($id)
|
||||
}
|
||||
else if ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_type_fees')
|
||||
{
|
||||
$langs->load('trips');
|
||||
$langs->loadLangs(array("trips"));
|
||||
$key = $langs->trans(strtoupper($obj->code));
|
||||
$valuetoshow = ($obj->code && $key != strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]});
|
||||
}
|
||||
@ -961,11 +961,11 @@ if ($id)
|
||||
$valuetoshow = $langs->getCurrencySymbol($obj->code,1);
|
||||
}
|
||||
else if ($fieldlist[$field]=='label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_units') {
|
||||
$langs->load("products");
|
||||
$langs->loadLangs(array("products"));
|
||||
$valuetoshow=$langs->trans($obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='short_label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_units') {
|
||||
$langs->load("products");
|
||||
$langs->loadLangs(array("products"));
|
||||
$valuetoshow = $langs->trans($obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if (($fieldlist[$field] == 'unit') && ($tabname[$id] == MAIN_DB_PREFIX.'c_paper_format'))
|
||||
|
||||
@ -31,9 +31,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
|
||||
$error = 0;
|
||||
|
||||
// Langs
|
||||
$langs->load("bills");
|
||||
$langs->load("accountancy");
|
||||
$langs->loadLangs(array("bills","accountancy"));
|
||||
|
||||
$mesg = '';
|
||||
$action = GETPOST('action','aZ09');
|
||||
|
||||
@ -29,8 +29,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
|
||||
$error = 0;
|
||||
|
||||
$langs->load("bills");
|
||||
$langs->load("accountancy");
|
||||
$langs->loadLangs(array("bills","accountancy"));
|
||||
|
||||
$mesg = '';
|
||||
$id = GETPOST('id', 'int');
|
||||
|
||||
@ -178,7 +178,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
}
|
||||
if (! is_numeric(GETPOST('position','alpha')))
|
||||
{
|
||||
$langs->load("errors");
|
||||
$langs->loadLangs(array("errors"));
|
||||
$ok=0;
|
||||
setEventMessages($langs->transnoentities('ErrorFieldMustBeANumeric', $langs->transnoentities("Position")), null, 'errors');
|
||||
}
|
||||
@ -735,7 +735,7 @@ if ($id)
|
||||
$valuetoshow=($obj->code && $key != "Country".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_availability') {
|
||||
$langs->load("propal");
|
||||
$langs->loadLangs(array("propal"));
|
||||
$key=$langs->trans("AvailabilityType".strtoupper($obj->code));
|
||||
$valuetoshow=($obj->code && $key != "AvailabilityType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
|
||||
@ -34,12 +34,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
$langs->load("admin");
|
||||
$langs->load("accountancy");
|
||||
$langs->load("salaries");
|
||||
$langs->load("loan");
|
||||
$langs->loadLangs(array("compta","bills","admin","accountancy","salaries","loan"));
|
||||
|
||||
// Security check
|
||||
if (empty($user->rights->accounting->chartofaccount))
|
||||
|
||||
@ -28,15 +28,11 @@
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountancyexport.class.php';
|
||||
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
$langs->load("admin");
|
||||
$langs->load("accountancy");
|
||||
$langs->loadLangs(array("compta","bills","admin","accountancy"));
|
||||
|
||||
// Security access
|
||||
if (empty($user->rights->accounting->chartofaccount))
|
||||
|
||||
@ -39,8 +39,7 @@ $pagenext = $page + 1;
|
||||
if (! $sortfield) $sortfield="f.rowid"; // Set here default search field
|
||||
if (! $sortorder) $sortorder="ASC";
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("compta");
|
||||
$langs->loadLangs(array("admin","compta"));
|
||||
|
||||
// Security check
|
||||
if ($user->societe_id > 0)
|
||||
|
||||
@ -26,8 +26,7 @@ require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/fiscalyear.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/fiscalyear.class.php';
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("compta");
|
||||
$langs->loadLangs(array("admin","compta"));
|
||||
|
||||
// Security check
|
||||
if ($user->societe_id > 0)
|
||||
|
||||
@ -26,8 +26,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/fiscalyear.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/fiscalyear.class.php';
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("compta");
|
||||
$langs->loadLangs(array("admin","compta"));
|
||||
|
||||
// Security check
|
||||
if ($user->societe_id > 0)
|
||||
|
||||
@ -24,16 +24,12 @@
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
|
||||
// langs
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
$langs->load("main");
|
||||
$langs->load("accountancy");
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("compta","bills","accountancy"));
|
||||
|
||||
// Security check
|
||||
if (! $user->admin)
|
||||
@ -141,7 +137,6 @@ if ($result) {
|
||||
$form = new Form($db);
|
||||
$formaccounting = new FormAccounting($db);
|
||||
|
||||
$var = true;
|
||||
while ( $i < min($num_lines, $limit) ) {
|
||||
$objp = $db->fetch_object($result);
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
@ -32,10 +32,7 @@ require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
$langs->load("admin");
|
||||
$langs->load("accountancy");
|
||||
$langs->loadLangs(array("compta","bills","admin","accountancy"));
|
||||
|
||||
// Security access
|
||||
if (empty($user->rights->accounting->chartofaccount))
|
||||
|
||||
@ -30,9 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php';
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("compta");
|
||||
$langs->load("accountancy");
|
||||
$langs->loadLangs(array("admin","compta","accountancy"));
|
||||
|
||||
$action=GETPOST('action','alpha')?GETPOST('action','alpha'):'view';
|
||||
$confirm=GETPOST('confirm','alpha');
|
||||
@ -629,7 +627,7 @@ if ($id)
|
||||
$valuetoshow=$langs->trans('All');
|
||||
}
|
||||
else if ($fieldlist[$field]=='nature' && $tabname[$id]==MAIN_DB_PREFIX.'accounting_journal') {
|
||||
$langs->load("accountancy");
|
||||
$langs->loadLangs(array("accountancy"));
|
||||
$key=$langs->trans("AccountingJournalType".strtoupper($obj->nature));
|
||||
$valuetoshow=($obj->nature && $key != "AccountingJournalType".strtoupper($obj->nature)?$key:$obj->{$fieldlist[$field]});
|
||||
}
|
||||
|
||||
@ -26,7 +26,6 @@
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/report.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
|
||||
@ -35,12 +34,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("companies");
|
||||
$langs->load("compta");
|
||||
$langs->load("main");
|
||||
$langs->load("accountancy");
|
||||
$langs->load("products");
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("companies","compta","accountancy","products"));
|
||||
|
||||
// Security check
|
||||
if (empty($conf->accounting->enabled)) {
|
||||
@ -360,7 +355,6 @@ if ($result)
|
||||
|
||||
$product_static = new Product($db);
|
||||
|
||||
$var = true;
|
||||
$i=0;
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
|
||||
@ -35,7 +35,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("accountancy");
|
||||
$langs->loadLangs(array("accountancy"));
|
||||
|
||||
$page = GETPOST("page");
|
||||
$sortorder = GETPOST("sortorder");
|
||||
|
||||
@ -26,16 +26,11 @@
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("main");
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
$langs->load("other");
|
||||
$langs->load("accountancy");
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("bills","compta","accountancy","other"));
|
||||
|
||||
// Filter
|
||||
$year = GETPOST("year",'int');
|
||||
@ -75,8 +70,6 @@ if ($result) {
|
||||
|
||||
$y = $year_current;
|
||||
|
||||
$var = true;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td width=150>' . $langs->trans("Label") . '</td><td align="center">' . $langs->trans("JanuaryMin") . '</td><td align="center">' . $langs->trans("FebruaryMin") . '</td><td align="center">' . $langs->trans("MarchMin") . '</td><td align="center">' . $langs->trans("AprilMin") . '</td><td align="center">' . $langs->trans("MayMin") . '</td><td align="center">' . $langs->trans("JuneMin") . '</td><td align="center">' . $langs->trans("JulyMin") . '</td><td align="center">' . $langs->trans("AugustMin") . '</td><td align="center">' . $langs->trans("SeptemberMin") . '</td><td align="center">' . $langs->trans("OctoberMin") . '</td><td align="center">' . $langs->trans("NovemberMin") . '</td><td align="center">' . $langs->trans("DecemberMin") . '</td><td align="center"><b>Total</b></td></tr>';
|
||||
|
||||
@ -108,7 +101,7 @@ if ($resql) {
|
||||
|
||||
$row = $db->fetch_row($resql);
|
||||
|
||||
print '<tr><td width="14%">' . length_accountg($row[0]) . '</td>';
|
||||
print '<tr class="oddeven"><td width="14%">' . length_accountg($row[0]) . '</td>';
|
||||
print '<td align="right" width="6.5%">' . price($row[1]) . '</td>';
|
||||
print '<td align="right" width="6.5%">' . price($row[2]) . '</td>';
|
||||
print '<td align="right" width="6.5%">' . price($row[3]) . '</td>';
|
||||
|
||||
@ -32,8 +32,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("accountancy");
|
||||
$langs->loadLangs(array("accountancy"));
|
||||
|
||||
$action = GETPOST('action', 'alpha');
|
||||
$search_mvt_num = GETPOST('search_mvt_num', 'int');
|
||||
|
||||
@ -33,8 +33,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("accountancy");
|
||||
$langs->loadLangs(array("accountancy"));
|
||||
|
||||
$page = GETPOST("page");
|
||||
$sortorder = GETPOST("sortorder");
|
||||
|
||||
@ -33,6 +33,8 @@ require_once DOL_DOCUMENT_ROOT . '/accountancy/class/lettering.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
|
||||
|
||||
$langs->loadLangs(array("compta"));
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$massaction = GETPOST('massaction', 'alpha');
|
||||
$show_files = GETPOST('show_files', 'int');
|
||||
@ -141,7 +143,6 @@ if ($object->check_codeclient() != 0)
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
$langs->load('compta');
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
print $form->editfieldkey("CustomerAccountancyCode", 'customeraccountancycode', $object->code_compta, $object, $user->rights->societe->creer);
|
||||
|
||||
@ -35,6 +35,8 @@ require_once DOL_DOCUMENT_ROOT . '/accountancy/class/lettering.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
|
||||
|
||||
$langs->loadLangs(array("compta"));
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$massaction = GETPOST('massaction', 'alpha');
|
||||
$show_files = GETPOST('show_files', 'int');
|
||||
@ -157,7 +159,6 @@ if ($object->check_codefournisseur() != 0)
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
$langs->load('compta');
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
print $form->editfieldkey("SupplierAccountancyCode", 'supplieraccountancycode', $object->code_compta_fournisseur, $object, $user->rights->societe->creer);
|
||||
|
||||
@ -566,7 +566,7 @@ class AccountingAccount extends CommonObject
|
||||
function LibStatut($statut,$mode=0)
|
||||
{
|
||||
global $langs;
|
||||
$langs->load('users');
|
||||
$langs->loadLangs(array("users"));
|
||||
|
||||
if ($mode == 0)
|
||||
{
|
||||
|
||||
@ -256,7 +256,7 @@ class AccountingJournal extends CommonObject
|
||||
{
|
||||
global $langs;
|
||||
|
||||
$langs->load("accountancy");
|
||||
$langs->loadLangs(array("accountancy"));
|
||||
|
||||
if ($mode == 0)
|
||||
{
|
||||
|
||||
@ -170,7 +170,7 @@ class BookKeeping extends CommonObject
|
||||
// Check parameters
|
||||
if (empty($this->numero_compte) || $this->numero_compte == '-1' || $this->numero_compte == 'NotDefined')
|
||||
{
|
||||
$langs->load("errors");
|
||||
$langs->loadLangs(array("errors"));
|
||||
if (in_array($this->doc_type, array('bank', 'expense_report')))
|
||||
{
|
||||
$this->errors[]=$langs->trans('ErrorFieldAccountNotDefinedForBankLine', $this->fk_docdet, $this->doc_type);
|
||||
|
||||
@ -24,13 +24,10 @@
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("bills");
|
||||
$langs->load("accountancy");
|
||||
$langs->loadLangs(array("bills","accountancy"));
|
||||
|
||||
$action = GETPOST('action', 'alpha');
|
||||
$cancel = GETPOST('cancel', 'alpha');
|
||||
|
||||
@ -27,7 +27,6 @@
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
|
||||
@ -35,12 +34,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("bills");
|
||||
$langs->load("compta");
|
||||
$langs->load("main");
|
||||
$langs->load("accountancy");
|
||||
$langs->load("productbatch");
|
||||
$langs->loadLangs(array("bills","compta","accountancy","productbatch"));
|
||||
|
||||
$account_parent = GETPOST('account_parent');
|
||||
$changeaccount = GETPOST('changeaccount');
|
||||
|
||||
@ -27,7 +27,6 @@
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
@ -36,13 +35,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
$langs->load("other");
|
||||
$langs->load("main");
|
||||
$langs->load("accountancy");
|
||||
$langs->load("productbatch");
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("bills","compta","accountancy","other","productbatch"));
|
||||
|
||||
$action=GETPOST('action','alpha');
|
||||
$massaction=GETPOST('massaction','alpha');
|
||||
|
||||
@ -28,14 +28,10 @@
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("bills");
|
||||
$langs->load("accountancy");
|
||||
$langs->load("trips");
|
||||
$langs->loadLangs(array("bills","accountancy","trips"));
|
||||
|
||||
$action = GETPOST('action', 'alpha');
|
||||
$cancel = GETPOST('cancel', 'alpha');
|
||||
|
||||
@ -26,7 +26,6 @@
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||
@ -34,14 +33,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
$langs->load("other");
|
||||
$langs->load("main");
|
||||
$langs->load("accountancy");
|
||||
$langs->load("trips");
|
||||
$langs->load("productbatch");
|
||||
$langs->loadLangs(array("compta","bills","other","accountancy","trips","productbatch"));
|
||||
|
||||
$account_parent = GETPOST('account_parent','int');
|
||||
$changeaccount = GETPOST('changeaccount');
|
||||
|
||||
@ -27,7 +27,6 @@
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
|
||||
@ -35,14 +34,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
$langs->load("other");
|
||||
$langs->load("trips");
|
||||
$langs->load("main");
|
||||
$langs->load("accountancy");
|
||||
$langs->load("productbatch");
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("bills","compta","accountancy","other","trips","productbatch"));
|
||||
|
||||
$action=GETPOST('action','alpha');
|
||||
$massaction=GETPOST('massaction','alpha');
|
||||
@ -345,7 +338,6 @@ if ($result) {
|
||||
$expensereport_static = new ExpenseReport($db);
|
||||
$form = new Form($db);
|
||||
|
||||
$var = true;
|
||||
while ( $i < min($num_lines, $limit) ) {
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
|
||||
@ -26,26 +26,12 @@ require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
$langs->load("other");
|
||||
$langs->load("main");
|
||||
$langs->load("accountancy");
|
||||
$langs->loadLangs(array("compta","bills","other","accountancy","loans","banks","admin","dict"));
|
||||
|
||||
// Security check
|
||||
if ($user->societe_id > 0)
|
||||
accessforbidden();
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("dict");
|
||||
$langs->load("bills");
|
||||
$langs->load("accountancy");
|
||||
$langs->load("compta");
|
||||
$langs->load("banks");
|
||||
$langs->load("loans");
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
@ -28,13 +28,10 @@
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("bills");
|
||||
$langs->load("accountancy");
|
||||
$langs->loadLangs(array("bills","accountancy"));
|
||||
|
||||
$action = GETPOST('action', 'alpha');
|
||||
$cancel = GETPOST('cancel', 'alpha');
|
||||
|
||||
@ -26,7 +26,6 @@
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
|
||||
@ -35,13 +34,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
$langs->load("other");
|
||||
$langs->load("main");
|
||||
$langs->load("accountancy");
|
||||
$langs->load("productbatch");
|
||||
$langs->loadLangs(array("compta","bills","other","accountancy","productbatch"));
|
||||
|
||||
$account_parent = GETPOST('account_parent');
|
||||
$changeaccount = GETPOST('changeaccount');
|
||||
|
||||
@ -27,7 +27,6 @@
|
||||
*/
|
||||
require '../../main.inc.php';
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.product.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
@ -36,13 +35,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
$langs->load("other");
|
||||
$langs->load("main");
|
||||
$langs->load("accountancy");
|
||||
$langs->load("productbatch");
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("bills","compta","accountancy","other","productbatch"));
|
||||
|
||||
$action=GETPOST('action','alpha');
|
||||
$massaction=GETPOST('massaction','alpha');
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2017 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2017-2018 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
* 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
|
||||
@ -212,9 +212,9 @@ print "<br>\n";
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||
if (defaulturl) $param.='&defaulturl='.urlencode(defaulturl);
|
||||
if (defaultkey) $param.='&defaultkey='.urlencode(defaultkey);
|
||||
if (defaultvalue) $param.='&defaultvalue='.urlencode(defaultvalue);
|
||||
if ($defaulturl) $param.='&defaulturl='.urlencode($defaulturl);
|
||||
if ($defaultkey) $param.='&defaultkey='.urlencode($defaultkey);
|
||||
if ($defaultvalue) $param.='&defaultvalue='.urlencode($defaultvalue);
|
||||
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].((empty($user->entity) && $debug)?'?debug=1':'').'" method="POST">';
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2006-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
/* Copyright (C) 2006-2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2006-2018 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
* 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
|
||||
@ -36,7 +36,7 @@ $sortorder = GETPOST('sortorder','alpha');
|
||||
$page = GETPOST('page','int');
|
||||
if (! $sortorder) $sortorder="DESC";
|
||||
if (! $sortfield) $sortfield="date";
|
||||
if ($page < 0) { $page = 0; }
|
||||
if (empty($page) || $page == -1) { $page = 0; }
|
||||
$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
|
||||
$offset = $limit * $page;
|
||||
|
||||
|
||||
@ -7,11 +7,8 @@
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2013 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
<<<<<<< HEAD
|
||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
=======
|
||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2018 Juanjo Menent <jmenent@2byte.es>
|
||||
>>>>>>> branch '7.0' of git@github.com:Dolibarr/dolibarr.git
|
||||
*
|
||||
* 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
|
||||
|
||||
@ -1588,7 +1588,7 @@ else
|
||||
|
||||
if ($action != 'editline' || GETPOST('rowid') != $objp->rowid)
|
||||
{
|
||||
print '<tr '.$bcnd[$var].' class="tdtop">';
|
||||
print '<tr class="tdtop oddeven">';
|
||||
// Label
|
||||
if ($objp->fk_product > 0)
|
||||
{
|
||||
@ -1684,7 +1684,7 @@ else
|
||||
$colspan = 7;
|
||||
}
|
||||
|
||||
print '<tr '.$bcnd[$var].'>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td colspan="'.$colspan.'">';
|
||||
|
||||
// Date planned
|
||||
@ -1721,14 +1721,14 @@ else
|
||||
if (is_array($extralabelslines) && count($extralabelslines)>0) {
|
||||
$line = new ContratLigne($db);
|
||||
$line->fetch_optionals($objp->rowid);
|
||||
print $line->showOptionals($extrafieldsline, 'view', array('style'=>$bcnd[$var], 'colspan'=>$colspan), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1);
|
||||
print $line->showOptionals($extrafieldsline, 'view', array('style'=>'class="oddeven"', 'colspan'=>$colspan), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1);
|
||||
}
|
||||
}
|
||||
// Ligne en mode update
|
||||
else
|
||||
{
|
||||
// Ligne carac
|
||||
print "<tr ".$bcnd[$var].">";
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
if ($objp->fk_product)
|
||||
{
|
||||
@ -1783,7 +1783,7 @@ else
|
||||
if($conf->global->PRODUCT_USE_UNITS) $colspan++;
|
||||
|
||||
// Ligne dates prevues
|
||||
print "<tr ".$bcnd[$var].">";
|
||||
print '<tr class="oddeven">';
|
||||
print '<td colspan="'.$colspan.'">';
|
||||
print $langs->trans("DateStartPlanned").' ';
|
||||
$form->select_date($db->jdate($objp->date_debut),"date_start_update",$usehm,$usehm,($db->jdate($objp->date_debut)>0?0:1),"update");
|
||||
@ -1795,7 +1795,7 @@ else
|
||||
if (is_array($extralabelslines) && count($extralabelslines)>0) {
|
||||
$line = new ContratLigne($db);
|
||||
$line->fetch_optionals($objp->rowid);
|
||||
print $line->showOptionals($extrafieldsline, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$colspan), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1);
|
||||
print $line->showOptionals($extrafieldsline, 'edit', array('style'=>'class="oddeven"', 'colspan'=>$colspan), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1808,7 +1808,7 @@ else
|
||||
|
||||
if ($object->statut > 0)
|
||||
{
|
||||
print '<tr '.$bcnd[$var].'>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="tdhrthin" colspan="'.($conf->margin->enabled?7:6).'"><hr class="opacitymedium tdhrthin"></td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
@ -1886,7 +1886,7 @@ else
|
||||
{
|
||||
print '<table class="notopnoleftnoright tableforservicepart2'.($cursorline < $nbofservices ?' boxtablenobottom':'').'" width="100%">';
|
||||
|
||||
print '<tr '.$bcnd[$var].'>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("ServiceStatus").': '.$object->lines[$cursorline-1]->getLibStatut(4).'</td>';
|
||||
print '<td width="30" align="right">';
|
||||
if ($user->societe_id == 0)
|
||||
@ -1913,7 +1913,7 @@ else
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr '.$bcnd[$var].'>';
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
print '<td>';
|
||||
// Si pas encore active
|
||||
@ -1969,7 +1969,7 @@ else
|
||||
}
|
||||
}
|
||||
|
||||
print '<tr '.$bc[false].'>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="nohover">'.$langs->trans("DateServiceActivate").'</td><td class="nohover">';
|
||||
print $form->select_date($dateactstart,'',$usehm,$usehm,'',"active",1,0,1);
|
||||
print '</td>';
|
||||
@ -1981,7 +1981,7 @@ else
|
||||
|
||||
print '</tr>';
|
||||
|
||||
print '<tr '.$bc[false].'>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="nohover">'.$langs->trans("Comment").'</td><td colspan="3" class="nohover" colspan="'.($conf->margin->enabled?4:3).'"><input size="80" type="text" name="comment" value="'.$_POST["comment"].'"></td>';
|
||||
print '<td class="nohover right">';
|
||||
print '<input type="submit" class="button" name="activate" value="'.$langs->trans("Activate").'"> ';
|
||||
@ -2026,7 +2026,7 @@ else
|
||||
$now=dol_now();
|
||||
if ($dateactend > $now) $dateactend=$now;
|
||||
|
||||
print '<tr '.$bc[false].'><td colspan="2" class="nohover">';
|
||||
print '<tr class="oddeven"><td colspan="2" class="nohover">';
|
||||
if ($objp->statut >= 4)
|
||||
{
|
||||
if ($objp->statut == 4)
|
||||
@ -2039,7 +2039,7 @@ else
|
||||
print '<td class="center nohover">';
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr '.$bc[false].'>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="nohover">'.$langs->trans("Comment").'</td><td class="nohover"><input size="70" type="text" class="flat" name="comment" value="'.dol_escape_htmltag(GETPOST('comment', 'alpha')).'"></td>';
|
||||
print '<td class="nohover right">';
|
||||
print '<input type="submit" class="button" name="close" value="'.$langs->trans("Disable").'"> ';
|
||||
@ -2079,8 +2079,6 @@ else
|
||||
// Form to add new line
|
||||
if ($action != 'editline')
|
||||
{
|
||||
$var = true;
|
||||
|
||||
$forcetoshowtitlelines=1;
|
||||
|
||||
// Add free products/services
|
||||
@ -2201,8 +2199,7 @@ else
|
||||
$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
|
||||
$genallowed = $user->rights->contrat->lire;
|
||||
$delallowed = $user->rights->contrat->creer;
|
||||
|
||||
$var = true;
|
||||
|
||||
|
||||
print $formfile->showdocuments('contract', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang);
|
||||
|
||||
|
||||
@ -3923,23 +3923,26 @@ abstract class CommonObject
|
||||
$var = true;
|
||||
$i = 0;
|
||||
|
||||
foreach ($this->lines as $line)
|
||||
if (! empty($this->lines))
|
||||
{
|
||||
if (is_object($hookmanager) && (($line->product_type == 9 && ! empty($line->special_code)) || ! empty($line->fk_parent_line)))
|
||||
foreach ($this->lines as $line)
|
||||
{
|
||||
if (empty($line->fk_parent_line))
|
||||
if (is_object($hookmanager) && (($line->product_type == 9 && ! empty($line->special_code)) || ! empty($line->fk_parent_line)))
|
||||
{
|
||||
$parameters=array('line'=>$line,'var'=>$var,'i'=>$i);
|
||||
$action='';
|
||||
$hookmanager->executeHooks('printOriginObjectLine',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||
if (empty($line->fk_parent_line))
|
||||
{
|
||||
$parameters=array('line'=>$line,'var'=>$var,'i'=>$i);
|
||||
$action='';
|
||||
$hookmanager->executeHooks('printOriginObjectLine',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->printOriginLine($line, $var, $restrictlist);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->printOriginLine($line, $var, $restrictlist);
|
||||
}
|
||||
|
||||
$i++;
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015-2017 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015-2017 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
*
|
||||
* 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
|
||||
@ -1110,7 +1111,8 @@ class FormMail extends Form
|
||||
elseif ($type_template=='fichinter_send') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentSendFichInter"); }
|
||||
elseif ($type_template=='thirdparty') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentThirdparty"); }
|
||||
elseif ($type_template=='user') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentUser"); }
|
||||
|
||||
elseif (!empty($type_template)) { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContent".ucfirst($type_template)); }
|
||||
|
||||
$ret->label = 'default';
|
||||
$ret->lang = $outputlangs->defaultlang;
|
||||
$ret->topic = '';
|
||||
|
||||
@ -150,7 +150,7 @@ class FormTicketsup
|
||||
}
|
||||
print '<input type="hidden" name="fk_user_create" value="' . $this->fk_user_create . '">';
|
||||
|
||||
print '<div class="">';
|
||||
dol_fiche_head('');
|
||||
print '<table class="tableticket centpercent">';
|
||||
|
||||
|
||||
@ -183,7 +183,7 @@ class FormTicketsup
|
||||
print '<tr><td class="titlefield">' . $langs->trans("ThirdParty") . '</td><td>';
|
||||
$events = array();
|
||||
$events[] = array('method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php', 1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled'));
|
||||
print $form->select_company($this->withfromsocid, 'socid', '', 1, 1, '', $events);
|
||||
print $form->select_company($this->withfromsocid, 'socid', '', 1, 1, '', $events, 0, 'minwidth200');
|
||||
print '</td></tr>';
|
||||
if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->COMPANY_USE_SEARCH_TO_SELECT)) {
|
||||
$htmlname = 'socid';
|
||||
@ -443,7 +443,7 @@ class FormTicketsup
|
||||
|
||||
$ticketstat->loadCacheTypesTickets();
|
||||
|
||||
print '<select id="select' . $htmlname . '" class="flat select_tickettype'.($morecss?' '.$morecss:'').'" name="' . $htmlname . '">';
|
||||
print '<select id="select' . $htmlname . '" class="flat minwidth200'.($morecss?' '.$morecss:'').'" name="' . $htmlname . '">';
|
||||
if ($empty) {
|
||||
print '<option value=""> </option>';
|
||||
}
|
||||
@ -543,7 +543,7 @@ class FormTicketsup
|
||||
|
||||
$ticketstat->loadCacheCategoriesTickets();
|
||||
|
||||
print '<select id="select' . $htmlname . '" class="flat select_ticketcategory'.($morecss?' '.$morecss:'').'" name="' . $htmlname . '">';
|
||||
print '<select id="select' . $htmlname . '" class="flat minwidth150'.($morecss?' '.$morecss:'').'" name="' . $htmlname . '">';
|
||||
if ($empty) {
|
||||
print '<option value=""> </option>';
|
||||
}
|
||||
@ -612,7 +612,7 @@ class FormTicketsup
|
||||
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||
}
|
||||
|
||||
print ajax_combobox('select'.$htmlname);
|
||||
print ajax_combobox('select'.$htmlname,'',0,0,'off');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -644,7 +644,7 @@ class FormTicketsup
|
||||
|
||||
$ticketstat->loadCacheSeveritiesTickets();
|
||||
|
||||
print '<select id="select' . $htmlname . '" class="flat select_ticketseverity'.($morecss?' '.$morecss:'').'" name="' . $htmlname . '">';
|
||||
print '<select id="select' . $htmlname . '" class="flat minwidth150'.($morecss?' '.$morecss:'').'" name="' . $htmlname . '">';
|
||||
if ($empty) {
|
||||
print '<option value=""> </option>';
|
||||
}
|
||||
@ -864,7 +864,7 @@ class FormTicketsup
|
||||
// Destinataires
|
||||
print '<tr class="email_line"><td>' . $langs->trans('MailRecipients') . '</td><td colspan="2">';
|
||||
$ticketstat = new Ticketsup($this->db);
|
||||
$res = $ticketstat->fetch('', $this->track_id);
|
||||
$res = $ticketstat->fetch('', '', $this->track_id);
|
||||
if ($res) {
|
||||
// Retrieve email of all contacts (internal and external)
|
||||
$contacts = $ticketstat->getInfosTicketInternalContact();
|
||||
@ -887,7 +887,7 @@ class FormTicketsup
|
||||
$ticketstat->socid = $ticketstat->fk_soc;
|
||||
$ticketstat->fetch_thirdparty();
|
||||
|
||||
if (!in_array($ticketstat->thirdparty->email, $sendto)) {
|
||||
if (is_array($ticketstat->thirdparty->email) && !in_array($ticketstat->thirdparty->email, $sendto)) {
|
||||
$sendto[] = $ticketstat->thirdparty->email . '(' . $langs->trans('Customer') . ')';
|
||||
}
|
||||
}
|
||||
|
||||
@ -93,9 +93,7 @@ if (GETPOST('addfile') && !GETPOST('add_ticket')) {
|
||||
|
||||
// Remove file
|
||||
if (GETPOST('removedfile') && !GETPOST('add_ticket')) {
|
||||
////$res = $object->fetch('','',GETPOST('track_id'));
|
||||
////if($res > 0)
|
||||
////{
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
||||
|
||||
// Set tmp directory
|
||||
@ -103,9 +101,8 @@ if (GETPOST('removedfile') && !GETPOST('add_ticket')) {
|
||||
$upload_dir_tmp = $vardir . '/temp';
|
||||
|
||||
// TODO Delete only files that was uploaded from email form
|
||||
dol_remove_file_process($_POST['removedfile'], 0);
|
||||
dol_remove_file_process($_POST['removedfile'], 0, 0);
|
||||
$action = 'create_ticket';
|
||||
////}
|
||||
}
|
||||
if ($action == 'create_ticket' && GETPOST('add_ticket')) {
|
||||
$error = 0;
|
||||
|
||||
@ -274,9 +274,7 @@ if ($action == "view_ticketlist")
|
||||
$limit = $conf->liste_limit;
|
||||
|
||||
$page = GETPOST("page", 'int');
|
||||
if ($page == -1) {
|
||||
$page = 0;
|
||||
}
|
||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
|
||||
@ -134,7 +134,10 @@ include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be inc
|
||||
$userstat = new User($db);
|
||||
$form = new Form($db);
|
||||
$formticket = new FormTicketsup($db);
|
||||
$formproject = new FormProjets($db);
|
||||
|
||||
if (! empty($conf->projet->enabled)) {
|
||||
$formproject = new FormProjets($db);
|
||||
}
|
||||
|
||||
if ($action == 'view' || $action == 'add_message' || $action == 'close' || $action == 'delete' || $action == 'editcustomer' || $action == 'progression' || $action == 'reopen'
|
||||
|| $action == 'editsubject' || $action == 'edit_extras' || $action == 'update_extras' || $action == 'edit_extrafields' || $action == 'set_extrafields' || $action == 'classify' || $action == 'sel_contract' || $action == 'edit_message_init' || $action == 'set_status' || $action == 'dellink')
|
||||
@ -631,15 +634,15 @@ if ($action == 'view' || $action == 'add_message' || $action == 'close' || $acti
|
||||
|
||||
print '<div class="tagtd">';
|
||||
|
||||
print dol_print_phone($tab[$i]['phone'], '', '', '', AC_TEL).'<br>';
|
||||
print dol_print_phone($tab[$i]['phone'], '', '', '', 'AC_TEL').'<br>';
|
||||
|
||||
if (! empty($tab[$i]['phone_perso'])) {
|
||||
//print img_picto($langs->trans('PhonePerso'),'object_phoning.png','',0,0,0).' ';
|
||||
print '<br>'.dol_print_phone($tab[$i]['phone_perso'], '', '', '', AC_TEL).'<br>';
|
||||
print '<br>'.dol_print_phone($tab[$i]['phone_perso'], '', '', '', 'AC_TEL').'<br>';
|
||||
}
|
||||
if (! empty($tab[$i]['phone_mobile'])) {
|
||||
//print img_picto($langs->trans('PhoneMobile'),'object_phoning.png','',0,0,0).' ';
|
||||
print dol_print_phone($tab[$i]['phone_mobile'], '', '', '', AC_TEL).'<br>';
|
||||
print dol_print_phone($tab[$i]['phone_mobile'], '', '', '', 'AC_TEL').'<br>';
|
||||
}
|
||||
print '</div>';
|
||||
|
||||
|
||||
@ -1639,7 +1639,7 @@ class Ticketsup extends CommonObject
|
||||
{
|
||||
global $langs;
|
||||
|
||||
if (count($this->cache_logs_ticket)) {
|
||||
if (is_array($this->cache_logs_ticket) && count($this->cache_logs_ticket)) {
|
||||
return 0;
|
||||
}
|
||||
// Cache deja charge
|
||||
@ -1751,7 +1751,7 @@ class Ticketsup extends CommonObject
|
||||
{
|
||||
global $langs;
|
||||
|
||||
if (count($this->cache_msgs_ticket)) {
|
||||
if (is_array($this->cache_msgs_ticket) && count($this->cache_msgs_ticket)) {
|
||||
return 0;
|
||||
}
|
||||
// Cache deja charge
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2018 Jean-François FERRY <hello@librethic.io>
|
||||
* Copyright (C) 2016 Christophe Battarel <christophe@altairis.fr>
|
||||
/* Copyright (C) 2013-2018 Jean-François FERRY <hello@librethic.io>
|
||||
* Copyright (C) 2016 Christophe Battarel <christophe@altairis.fr>
|
||||
* Copyright (C) 2018 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
* 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
|
||||
@ -580,12 +581,13 @@ print '</tr>'."\n";
|
||||
|
||||
// Detect if we need a fetch on each output line
|
||||
$needToFetchEachLine=0;
|
||||
foreach ($extrafields->attributes[$object->table_element]['computed'] as $key => $val)
|
||||
{
|
||||
if (preg_match('/\$object/',$val)) $needToFetchEachLine++; // There is at least one compute field that use $object
|
||||
if (! empty($extrafields->attributes[$object->table_element]['computed'])) {
|
||||
foreach ($extrafields->attributes[$object->table_element]['computed'] as $key => $val)
|
||||
{
|
||||
if (preg_match('/\$object/',$val)) $needToFetchEachLine++; // There is at least one compute field that use $object
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Loop on record
|
||||
// --------------------------------------------------------------------
|
||||
$i=0;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user