Merge remote-tracking branch 'upstream/develop' into develop
This commit is contained in:
commit
b59d49d3b3
@ -5,7 +5,7 @@
|
|||||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
* Copyright (C) 2017 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2017-2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -50,11 +50,11 @@ $main_option = array (
|
|||||||
|
|
||||||
$configuration = AccountancyExport::getTypeConfig();
|
$configuration = AccountancyExport::getTypeConfig();
|
||||||
|
|
||||||
$listparam = $configuration[param];
|
$listparam = $configuration['param'];
|
||||||
|
|
||||||
$listformat = $configuration[format];
|
$listformat = $configuration['format'];
|
||||||
|
|
||||||
$listcr = $configuration[cr];
|
$listcr = $configuration['cr'];
|
||||||
|
|
||||||
|
|
||||||
$model_option = array (
|
$model_option = array (
|
||||||
@ -117,7 +117,7 @@ if ($action == 'update') {
|
|||||||
if (! $error) {
|
if (! $error) {
|
||||||
// reload
|
// reload
|
||||||
$configuration = AccountancyExport::getTypeConfig();
|
$configuration = AccountancyExport::getTypeConfig();
|
||||||
$listparam = $configuration[param];
|
$listparam = $configuration['param'];
|
||||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
} else {
|
} else {
|
||||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
@ -142,27 +142,27 @@ print ' {'."\n";
|
|||||||
foreach ($listparam as $key => $param) {
|
foreach ($listparam as $key => $param) {
|
||||||
print ' if (jQuery("#ACCOUNTING_EXPORT_MODELCSV").val()=="'.$key.'")'."\n";
|
print ' if (jQuery("#ACCOUNTING_EXPORT_MODELCSV").val()=="'.$key.'")'."\n";
|
||||||
print ' {'."\n";
|
print ' {'."\n";
|
||||||
print ' //console.log("'.$param[label].'");'."\n";
|
print ' //console.log("'.$param['label'].'");'."\n";
|
||||||
if (empty($param[ACCOUNTING_EXPORT_FORMAT])) {
|
if (empty($param['ACCOUNTING_EXPORT_FORMAT'])) {
|
||||||
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").val("'.$conf->global->ACCOUNTING_EXPORT_FORMAT.'");'."\n";
|
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").val("'.$conf->global->ACCOUNTING_EXPORT_FORMAT.'");'."\n";
|
||||||
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").prop("disabled", true);'."\n";
|
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").prop("disabled", true);'."\n";
|
||||||
} else {
|
} else {
|
||||||
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").val("'.$param[ACCOUNTING_EXPORT_FORMAT].'");'."\n";
|
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").val("'.$param['ACCOUNTING_EXPORT_FORMAT'].'");'."\n";
|
||||||
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").removeAttr("disabled");'."\n";
|
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").removeAttr("disabled");'."\n";
|
||||||
}
|
}
|
||||||
if (empty($param[ACCOUNTING_EXPORT_SEPARATORCSV])) {
|
if (empty($param['ACCOUNTING_EXPORT_SEPARATORCSV'])) {
|
||||||
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").val("");'."\n";
|
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").val("");'."\n";
|
||||||
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").prop("disabled", true);'."\n";
|
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").prop("disabled", true);'."\n";
|
||||||
} else {
|
} else {
|
||||||
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").val("'.$conf->global->ACCOUNTING_EXPORT_SEPARATORCSV.'");'."\n";
|
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").val("'.$conf->global->ACCOUNTING_EXPORT_SEPARATORCSV.'");'."\n";
|
||||||
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").removeAttr("disabled");'."\n";
|
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").removeAttr("disabled");'."\n";
|
||||||
}
|
}
|
||||||
if (empty($param[ACCOUNTING_EXPORT_ENDLINE])) {
|
if (empty($param['ACCOUNTING_EXPORT_ENDLINE'])) {
|
||||||
print ' jQuery("#ACCOUNTING_EXPORT_ENDLINE").prop("disabled", true);'."\n";
|
print ' jQuery("#ACCOUNTING_EXPORT_ENDLINE").prop("disabled", true);'."\n";
|
||||||
} else {
|
} else {
|
||||||
print ' jQuery("#ACCOUNTING_EXPORT_ENDLINE").removeAttr("disabled");'."\n";
|
print ' jQuery("#ACCOUNTING_EXPORT_ENDLINE").removeAttr("disabled");'."\n";
|
||||||
}
|
}
|
||||||
if (empty($param[ACCOUNTING_EXPORT_DATE])) {
|
if (empty($param['ACCOUNTING_EXPORT_DATE'])) {
|
||||||
print ' jQuery("#ACCOUNTING_EXPORT_DATE").val("");'."\n";
|
print ' jQuery("#ACCOUNTING_EXPORT_DATE").val("");'."\n";
|
||||||
print ' jQuery("#ACCOUNTING_EXPORT_DATE").prop("disabled", true);'."\n";
|
print ' jQuery("#ACCOUNTING_EXPORT_DATE").prop("disabled", true);'."\n";
|
||||||
} else {
|
} else {
|
||||||
@ -257,15 +257,15 @@ if ($num2) {
|
|||||||
print '<tr class="oddeven value">';
|
print '<tr class="oddeven value">';
|
||||||
|
|
||||||
// Param
|
// Param
|
||||||
$label = $key[label];
|
$label = $key['label'];
|
||||||
print '<td width="50%">' . $langs->trans($label) . '</td>';
|
print '<td width="50%">' . $langs->trans($label) . '</td>';
|
||||||
|
|
||||||
// Value
|
// Value
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if (is_array($key[param])) {
|
if (is_array($key['param'])) {
|
||||||
print $form->selectarray($label, $key[param], $conf->global->$label, 0);
|
print $form->selectarray($label, $key['param'], $conf->global->$label, 0);
|
||||||
} else {
|
} else {
|
||||||
print '<input type="text" size="20" id="'. $label .'" name="' . $key[label] . '" value="' . $conf->global->$label . '">';
|
print '<input type="text" size="20" id="'. $label .'" name="' . $key['label'] . '" value="' . $conf->global->$label . '">';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|||||||
@ -147,6 +147,7 @@ $paymentsalstatic = new PaymentSalary($db);
|
|||||||
$paymentexpensereportstatic = new PaymentExpenseReport($db);
|
$paymentexpensereportstatic = new PaymentExpenseReport($db);
|
||||||
$paymentvariousstatic = new PaymentVarious($db);
|
$paymentvariousstatic = new PaymentVarious($db);
|
||||||
$paymentloanstatic = new PaymentLoan($db);
|
$paymentloanstatic = new PaymentLoan($db);
|
||||||
|
$accountLinestatic=new AccountLine($db);
|
||||||
|
|
||||||
// Get code of finance journal
|
// Get code of finance journal
|
||||||
$accountingjournalstatic = new AccountingJournal($db);
|
$accountingjournalstatic = new AccountingJournal($db);
|
||||||
@ -370,7 +371,8 @@ if ($result) {
|
|||||||
$tabpay[$obj->rowid]["paymentloanid"] = $paymentloanstatic->id;
|
$tabpay[$obj->rowid]["paymentloanid"] = $paymentloanstatic->id;
|
||||||
//$tabtp[$obj->rowid][$account_pay_loan] += $obj->amount;
|
//$tabtp[$obj->rowid][$account_pay_loan] += $obj->amount;
|
||||||
} else if ($links[$key]['type'] == 'banktransfert') {
|
} else if ($links[$key]['type'] == 'banktransfert') {
|
||||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $langs->trans("BankTransfer");
|
$accountLinestatic->fetch($links[$key]['url_id']);
|
||||||
|
$tabpay[$obj->rowid]["lib"] .= ' '.$langs->trans("BankTransfer").'- ' .$accountLinestatic ->getNomUrl(1);
|
||||||
$tabtp[$obj->rowid][$account_transfer] += $obj->amount;
|
$tabtp[$obj->rowid][$account_transfer] += $obj->amount;
|
||||||
$bankaccountstatic->fetch($tabpay[$obj->rowid]['fk_bank_account']);
|
$bankaccountstatic->fetch($tabpay[$obj->rowid]['fk_bank_account']);
|
||||||
$tabpay[$obj->rowid]["soclib"] = $bankaccountstatic->getNomUrl(2);
|
$tabpay[$obj->rowid]["soclib"] = $bankaccountstatic->getNomUrl(2);
|
||||||
|
|||||||
@ -807,7 +807,7 @@ class Categorie extends CommonObject
|
|||||||
*
|
*
|
||||||
* @param string $type Type of category ('customer', 'supplier', 'contact', 'product', 'member')
|
* @param string $type Type of category ('customer', 'supplier', 'contact', 'product', 'member')
|
||||||
* @param int $onlyids Return only ids of objects (consume less memory)
|
* @param int $onlyids Return only ids of objects (consume less memory)
|
||||||
* @return mixed -1 if KO, array of instance of object if OK
|
* @return array|int -1 if KO, array of instance of object if OK
|
||||||
* @see containsObject
|
* @see containsObject
|
||||||
*/
|
*/
|
||||||
function getObjectsInCateg($type, $onlyids=0)
|
function getObjectsInCateg($type, $onlyids=0)
|
||||||
|
|||||||
@ -34,10 +34,16 @@ class Ldap
|
|||||||
*/
|
*/
|
||||||
public $error='';
|
public $error='';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string[] Array of error strings
|
||||||
|
*/
|
||||||
|
public $errors = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tableau des serveurs (IP addresses ou nom d'hotes)
|
* Tableau des serveurs (IP addresses ou nom d'hotes)
|
||||||
*/
|
*/
|
||||||
var $server=array();
|
var $server=array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base DN (e.g. "dc=foo,dc=com")
|
* Base DN (e.g. "dc=foo,dc=com")
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1067,11 +1067,14 @@ else
|
|||||||
print $formproduct->select_measuring_units("surface_units","surface");
|
print $formproduct->select_measuring_units("surface_units","surface");
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
// Volume
|
if (empty($conf->global->PRODUCT_DISABLE_VOLUME))
|
||||||
print '<tr><td>'.$langs->trans("Volume").'</td><td colspan="3">';
|
{
|
||||||
print '<input name="volume" size="4" value="'.GETPOST('volume').'">';
|
// Volume
|
||||||
print $formproduct->select_measuring_units("volume_units","volume");
|
print '<tr><td>'.$langs->trans("Volume").'</td><td colspan="3">';
|
||||||
print '</td></tr>';
|
print '<input name="volume" size="4" value="'.GETPOST('volume').'">';
|
||||||
|
print $formproduct->select_measuring_units("volume_units","volume");
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Units
|
// Units
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user