Merge branch 'develop' into nospaceaftercomma
This commit is contained in:
commit
a6dde3d6bd
@ -187,6 +187,9 @@
|
|||||||
</rule>
|
</rule>
|
||||||
<rule ref="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose" />
|
<rule ref="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose" />
|
||||||
|
|
||||||
|
<rule ref="Squiz.ControlStructures.ForEachLoopDeclaration.SpaceAfterOpen" />
|
||||||
|
<rule ref="Squiz.ControlStructures.ForEachLoopDeclaration.SpaceBeforeClose" />
|
||||||
|
|
||||||
<rule ref="Squiz.Functions.MultiLineFunctionDeclaration" />
|
<rule ref="Squiz.Functions.MultiLineFunctionDeclaration" />
|
||||||
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
|
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
|
||||||
<properties>
|
<properties>
|
||||||
@ -429,5 +432,5 @@
|
|||||||
<rule ref="PSR2.Classes.ClassDeclaration" />
|
<rule ref="PSR2.Classes.ClassDeclaration" />
|
||||||
<rule ref="PSR2.Methods.FunctionClosingBrace" />
|
<rule ref="PSR2.Methods.FunctionClosingBrace" />
|
||||||
<rule ref="PSR2.Files.EndFileNewline.TooMany" />
|
<rule ref="PSR2.Files.EndFileNewline.TooMany" />
|
||||||
|
<rule ref="PSR2.Files.EndFileNewline.NoneFound" />
|
||||||
</ruleset>
|
</ruleset>
|
||||||
|
|||||||
@ -167,7 +167,7 @@ class autoTranslator
|
|||||||
fwrite($fp, "\n");
|
fwrite($fp, "\n");
|
||||||
fwrite($fp, "// START - Lines generated via autotranslator.php tool (".$this->_time.").\n");
|
fwrite($fp, "// START - Lines generated via autotranslator.php tool (".$this->_time.").\n");
|
||||||
fwrite($fp, "// Reference language: ".$this->_refLang." -> ".$my_destlang."\n");
|
fwrite($fp, "// Reference language: ".$this->_refLang." -> ".$my_destlang."\n");
|
||||||
foreach( $this->_translatedFiles[$file] as $line) {
|
foreach($this->_translatedFiles[$file] as $line) {
|
||||||
fwrite($fp, $line . "\n");
|
fwrite($fp, $line . "\n");
|
||||||
}
|
}
|
||||||
fwrite($fp, "// STOP - Lines generated via autotranslator.php tool (".$this->_time_end.").\n");
|
fwrite($fp, "// STOP - Lines generated via autotranslator.php tool (".$this->_time_end.").\n");
|
||||||
@ -209,7 +209,7 @@ class autoTranslator
|
|||||||
{
|
{
|
||||||
|
|
||||||
//print "key =".$key."\n";
|
//print "key =".$key."\n";
|
||||||
foreach( $content as $line ) {
|
foreach($content as $line) {
|
||||||
$destKey = $this->getLineKey($line);
|
$destKey = $this->getLineKey($line);
|
||||||
$destValue = $this->getLineValue($line);
|
$destValue = $this->getLineValue($line);
|
||||||
// If translated return
|
// If translated return
|
||||||
|
|||||||
@ -61,7 +61,7 @@ $accountingcategory = new AccountancyCategory($db);
|
|||||||
// si ajout de comptes
|
// si ajout de comptes
|
||||||
if (! empty($selectcpt)) {
|
if (! empty($selectcpt)) {
|
||||||
$cpts = array ();
|
$cpts = array ();
|
||||||
foreach ( $selectcpt as $selectedoption ) {
|
foreach ($selectcpt as $selectedoption) {
|
||||||
if (! array_key_exists($selectedoption, $cpts))
|
if (! array_key_exists($selectedoption, $cpts))
|
||||||
$cpts[$selectedoption] = "'" . $selectedoption . "'";
|
$cpts[$selectedoption] = "'" . $selectedoption . "'";
|
||||||
}
|
}
|
||||||
@ -167,7 +167,7 @@ if ($action == 'display' || $action == 'delete') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_array($accountingcategory->lines_display) && count($accountingcategory->lines_display) > 0) {
|
if (is_array($accountingcategory->lines_display) && count($accountingcategory->lines_display) > 0) {
|
||||||
foreach ( $accountingcategory->lines_display as $cpt ) {
|
foreach ($accountingcategory->lines_display as $cpt) {
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>' . length_accountg($cpt->account_number) . '</td>';
|
print '<td>' . length_accountg($cpt->account_number) . '</td>';
|
||||||
print '<td>' . $cpt->label . '</td>';
|
print '<td>' . $cpt->label . '</td>';
|
||||||
|
|||||||
@ -96,7 +96,7 @@ if (GETPOST('change_chart', 'alpha'))
|
|||||||
if ($action == 'update') {
|
if ($action == 'update') {
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
foreach ( $list_account_main as $constname ) {
|
foreach ($list_account_main as $constname) {
|
||||||
$constvalue = GETPOST($constname, 'alpha');
|
$constvalue = GETPOST($constname, 'alpha');
|
||||||
|
|
||||||
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
|
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
|
||||||
@ -104,7 +104,7 @@ if ($action == 'update') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ( $list_account as $constname ) {
|
foreach ($list_account as $constname) {
|
||||||
$constvalue = GETPOST($constname, 'alpha');
|
$constvalue = GETPOST($constname, 'alpha');
|
||||||
|
|
||||||
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
|
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
|
||||||
|
|||||||
@ -96,7 +96,7 @@ if ($action == 'update') {
|
|||||||
$error ++;
|
$error ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ( $main_option as $constname ) {
|
foreach ($main_option as $constname) {
|
||||||
$constvalue = GETPOST($constname, 'alpha');
|
$constvalue = GETPOST($constname, 'alpha');
|
||||||
|
|
||||||
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
|
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
|
||||||
@ -104,7 +104,7 @@ if ($action == 'update') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($listparam[$modelcsv] as $key => $value ) {
|
foreach ($listparam[$modelcsv] as $key => $value) {
|
||||||
$constante = $key;
|
$constante = $key;
|
||||||
|
|
||||||
if (strpos($constante, 'ACCOUNTING')!==false) {
|
if (strpos($constante, 'ACCOUNTING')!==false) {
|
||||||
@ -198,7 +198,7 @@ print "</tr>\n";
|
|||||||
|
|
||||||
$num = count($main_option);
|
$num = count($main_option);
|
||||||
if ($num) {
|
if ($num) {
|
||||||
foreach ( $main_option as $key ) {
|
foreach ($main_option as $key) {
|
||||||
|
|
||||||
print '<tr class="oddeven value">';
|
print '<tr class="oddeven value">';
|
||||||
|
|
||||||
@ -256,7 +256,7 @@ if ($num2) {
|
|||||||
print '<td colspan="3">' . $langs->trans('OtherOptions') . '</td>';
|
print '<td colspan="3">' . $langs->trans('OtherOptions') . '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
foreach ( $model_option as $key) {
|
foreach ($model_option as $key) {
|
||||||
print '<tr class="oddeven value">';
|
print '<tr class="oddeven value">';
|
||||||
|
|
||||||
// Param
|
// Param
|
||||||
|
|||||||
@ -58,7 +58,7 @@ static $tmpstatut2label = array (
|
|||||||
$statut2label = array (
|
$statut2label = array (
|
||||||
''
|
''
|
||||||
);
|
);
|
||||||
foreach ( $tmpstatut2label as $key => $val )
|
foreach ($tmpstatut2label as $key => $val)
|
||||||
$statut2label[$key] = $langs->trans($val);
|
$statut2label[$key] = $langs->trans($val);
|
||||||
|
|
||||||
$errors = array ();
|
$errors = array ();
|
||||||
|
|||||||
@ -50,7 +50,7 @@ static $tmpstatut2label = array (
|
|||||||
$statut2label = array (
|
$statut2label = array (
|
||||||
''
|
''
|
||||||
);
|
);
|
||||||
foreach ( $tmpstatut2label as $key => $val )
|
foreach ($tmpstatut2label as $key => $val)
|
||||||
$statut2label[$key] = $langs->trans($val);
|
$statut2label[$key] = $langs->trans($val);
|
||||||
|
|
||||||
$object = new Fiscalyear($db);
|
$object = new Fiscalyear($db);
|
||||||
|
|||||||
@ -68,7 +68,7 @@ if ($_POST["action"] == 'import') {
|
|||||||
$obj = $db->fetch_object($result);
|
$obj = $db->fetch_object($result);
|
||||||
|
|
||||||
$cpt = 0;
|
$cpt = 0;
|
||||||
foreach ( $to_import as $maLigneCochee ) {
|
foreach ($to_import as $maLigneCochee) {
|
||||||
|
|
||||||
$accounting = new AccountingAccount($db);
|
$accounting = new AccountingAccount($db);
|
||||||
|
|
||||||
|
|||||||
@ -134,7 +134,7 @@ if ($action == 'update') {
|
|||||||
$arrayofdifferentselectedvalues = array();
|
$arrayofdifferentselectedvalues = array();
|
||||||
|
|
||||||
$cpt = 0; $ok = 0; $ko = 0;
|
$cpt = 0; $ok = 0; $ko = 0;
|
||||||
foreach ( $chk_prod as $productid )
|
foreach ($chk_prod as $productid)
|
||||||
{
|
{
|
||||||
$accounting_account_id = GETPOST('codeventil_' . $productid);
|
$accounting_account_id = GETPOST('codeventil_' . $productid);
|
||||||
|
|
||||||
|
|||||||
@ -605,7 +605,7 @@ class AccountancyCategory // extends CommonObject
|
|||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
if ($error) {
|
if ($error) {
|
||||||
foreach ( $this->errors as $errmsg ) {
|
foreach ($this->errors as $errmsg) {
|
||||||
dol_syslog(__METHOD__ . " " . $errmsg, LOG_ERR);
|
dol_syslog(__METHOD__ . " " . $errmsg, LOG_ERR);
|
||||||
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
||||||
}
|
}
|
||||||
@ -644,7 +644,7 @@ class AccountancyCategory // extends CommonObject
|
|||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
if ($error) {
|
if ($error) {
|
||||||
foreach ( $this->errors as $errmsg ) {
|
foreach ($this->errors as $errmsg) {
|
||||||
dol_syslog(__METHOD__ . " " . $errmsg, LOG_ERR);
|
dol_syslog(__METHOD__ . " " . $errmsg, LOG_ERR);
|
||||||
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -272,7 +272,7 @@ class AccountancyExport
|
|||||||
*/
|
*/
|
||||||
public function exportCegid($objectLines)
|
public function exportCegid($objectLines)
|
||||||
{
|
{
|
||||||
foreach ( $objectLines as $line ) {
|
foreach ($objectLines as $line) {
|
||||||
$date = dol_print_date($line->doc_date, '%d%m%Y');
|
$date = dol_print_date($line->doc_date, '%d%m%Y');
|
||||||
$separator = ";";
|
$separator = ";";
|
||||||
$end_line = "\n";
|
$end_line = "\n";
|
||||||
@ -298,7 +298,7 @@ class AccountancyExport
|
|||||||
*/
|
*/
|
||||||
public function exportCogilog($objectLines)
|
public function exportCogilog($objectLines)
|
||||||
{
|
{
|
||||||
foreach ( $objectLines as $line ) {
|
foreach ($objectLines as $line) {
|
||||||
$date = dol_print_date($line->doc_date, '%d%m%Y');
|
$date = dol_print_date($line->doc_date, '%d%m%Y');
|
||||||
$separator = ";";
|
$separator = ";";
|
||||||
$end_line = "\n";
|
$end_line = "\n";
|
||||||
@ -336,7 +336,7 @@ class AccountancyExport
|
|||||||
$separator = ";";
|
$separator = ";";
|
||||||
$end_line = "\n";
|
$end_line = "\n";
|
||||||
|
|
||||||
foreach ( $objectLines as $line ) {
|
foreach ($objectLines as $line) {
|
||||||
$date = dol_print_date($line->doc_date, '%d/%m/%Y');
|
$date = dol_print_date($line->doc_date, '%d/%m/%Y');
|
||||||
print $date . $separator;
|
print $date . $separator;
|
||||||
print $line->code_journal . $separator;
|
print $line->code_journal . $separator;
|
||||||
@ -365,7 +365,7 @@ class AccountancyExport
|
|||||||
$separator = ";";
|
$separator = ";";
|
||||||
$end_line = "\n";
|
$end_line = "\n";
|
||||||
|
|
||||||
foreach ( $objectLines as $line ) {
|
foreach ($objectLines as $line) {
|
||||||
print $line->piece_num . $separator;
|
print $line->piece_num . $separator;
|
||||||
$date = dol_print_date($line->doc_date, '%d/%m/%Y');
|
$date = dol_print_date($line->doc_date, '%d/%m/%Y');
|
||||||
print $date . $separator;
|
print $date . $separator;
|
||||||
@ -405,7 +405,7 @@ class AccountancyExport
|
|||||||
|
|
||||||
$i = 1;
|
$i = 1;
|
||||||
$date_ecriture = dol_print_date(dol_now(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be yyyymmdd
|
$date_ecriture = dol_print_date(dol_now(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be yyyymmdd
|
||||||
foreach ( $TData as $data ) {
|
foreach ($TData as $data) {
|
||||||
$code_compta = $data->numero_compte;
|
$code_compta = $data->numero_compte;
|
||||||
if (! empty($data->subledger_account))
|
if (! empty($data->subledger_account))
|
||||||
$code_compta = $data->subledger_account;
|
$code_compta = $data->subledger_account;
|
||||||
@ -447,7 +447,7 @@ class AccountancyExport
|
|||||||
//We should use dol_now function not time however this is wrong date to transfert in accounting
|
//We should use dol_now function not time however this is wrong date to transfert in accounting
|
||||||
//$date_ecriture = dol_print_date(dol_now(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be ddmmyy
|
//$date_ecriture = dol_print_date(dol_now(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be ddmmyy
|
||||||
//$date_ecriture = dol_print_date(time(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be ddmmyy
|
//$date_ecriture = dol_print_date(time(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be ddmmyy
|
||||||
foreach ( $TData as $data ) {
|
foreach ($TData as $data) {
|
||||||
$code_compta = $data->numero_compte;
|
$code_compta = $data->numero_compte;
|
||||||
if (! empty($data->subledger_account))
|
if (! empty($data->subledger_account))
|
||||||
$code_compta = $data->subledger_account;
|
$code_compta = $data->subledger_account;
|
||||||
@ -528,7 +528,7 @@ class AccountancyExport
|
|||||||
$separator = ',';
|
$separator = ',';
|
||||||
$end_line = "\n";
|
$end_line = "\n";
|
||||||
|
|
||||||
foreach ( $objectLines as $line ) {
|
foreach ($objectLines as $line) {
|
||||||
|
|
||||||
$date = dol_print_date($line->doc_date, '%d%m%Y');
|
$date = dol_print_date($line->doc_date, '%d%m%Y');
|
||||||
|
|
||||||
@ -561,7 +561,7 @@ class AccountancyExport
|
|||||||
$separator = ';';
|
$separator = ';';
|
||||||
$end_line = "\n";
|
$end_line = "\n";
|
||||||
|
|
||||||
foreach ( $objectLines as $line ) {
|
foreach ($objectLines as $line) {
|
||||||
|
|
||||||
$date = dol_print_date($line->doc_date, '%d%m%Y');
|
$date = dol_print_date($line->doc_date, '%d%m%Y');
|
||||||
|
|
||||||
@ -652,7 +652,7 @@ class AccountancyExport
|
|||||||
print "Idevise";
|
print "Idevise";
|
||||||
print $end_line;
|
print $end_line;
|
||||||
|
|
||||||
foreach ( $objectLines as $line ) {
|
foreach ($objectLines as $line) {
|
||||||
$date_creation = dol_print_date($line->date_creation, '%d%m%Y');
|
$date_creation = dol_print_date($line->date_creation, '%d%m%Y');
|
||||||
$date_doc = dol_print_date($line->doc_date, '%d%m%Y');
|
$date_doc = dol_print_date($line->doc_date, '%d%m%Y');
|
||||||
$date_valid = dol_print_date($line->date_validated, '%d%m%Y');
|
$date_valid = dol_print_date($line->date_validated, '%d%m%Y');
|
||||||
|
|||||||
@ -440,7 +440,7 @@ class AccountingAccount extends CommonObject
|
|||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
if ($error) {
|
if ($error) {
|
||||||
foreach ( $this->errors as $errmsg ) {
|
foreach ($this->errors as $errmsg) {
|
||||||
dol_syslog(get_class($this) . "::delete " . $errmsg, LOG_ERR);
|
dol_syslog(get_class($this) . "::delete " . $errmsg, LOG_ERR);
|
||||||
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -153,7 +153,7 @@ class AccountingJournal extends CommonObject
|
|||||||
// Manage filter
|
// Manage filter
|
||||||
$sqlwhere = array();
|
$sqlwhere = array();
|
||||||
if (count($filter) > 0) {
|
if (count($filter) > 0) {
|
||||||
foreach ( $filter as $key => $value ) {
|
foreach ($filter as $key => $value) {
|
||||||
if ($key == 't.code' || $key == 't.label' || $key == 't.nature') {
|
if ($key == 't.code' || $key == 't.label' || $key == 't.nature') {
|
||||||
$sqlwhere[] = $key . '\'' . $this->db->escape($value) . '\'';
|
$sqlwhere[] = $key . '\'' . $this->db->escape($value) . '\'';
|
||||||
} elseif ($key == 't.rowid' || $key == 't.active') {
|
} elseif ($key == 't.rowid' || $key == 't.active') {
|
||||||
|
|||||||
@ -777,7 +777,7 @@ class BookKeeping extends CommonObject
|
|||||||
// Manage filter
|
// Manage filter
|
||||||
$sqlwhere = array ();
|
$sqlwhere = array ();
|
||||||
if (count($filter) > 0) {
|
if (count($filter) > 0) {
|
||||||
foreach ( $filter as $key => $value ) {
|
foreach ($filter as $key => $value) {
|
||||||
if ($key == 't.doc_date') {
|
if ($key == 't.doc_date') {
|
||||||
$sqlwhere[] = $key . '=\'' . $this->db->idate($value) . '\'';
|
$sqlwhere[] = $key . '=\'' . $this->db->idate($value) . '\'';
|
||||||
} elseif ($key == 't.doc_date>=' || $key == 't.doc_date<=') {
|
} elseif ($key == 't.doc_date>=' || $key == 't.doc_date<=') {
|
||||||
@ -909,7 +909,7 @@ class BookKeeping extends CommonObject
|
|||||||
// Manage filter
|
// Manage filter
|
||||||
$sqlwhere = array ();
|
$sqlwhere = array ();
|
||||||
if (count($filter) > 0) {
|
if (count($filter) > 0) {
|
||||||
foreach ( $filter as $key => $value ) {
|
foreach ($filter as $key => $value) {
|
||||||
if ($key == 't.doc_date') {
|
if ($key == 't.doc_date') {
|
||||||
$sqlwhere[] = $key . '=\'' . $this->db->idate($value) . '\'';
|
$sqlwhere[] = $key . '=\'' . $this->db->idate($value) . '\'';
|
||||||
} elseif ($key == 't.doc_date>=' || $key == 't.doc_date<=') {
|
} elseif ($key == 't.doc_date>=' || $key == 't.doc_date<=') {
|
||||||
@ -1021,7 +1021,7 @@ class BookKeeping extends CommonObject
|
|||||||
// Manage filter
|
// Manage filter
|
||||||
$sqlwhere = array ();
|
$sqlwhere = array ();
|
||||||
if (count($filter) > 0) {
|
if (count($filter) > 0) {
|
||||||
foreach ( $filter as $key => $value ) {
|
foreach ($filter as $key => $value) {
|
||||||
if ($key == 't.doc_date') {
|
if ($key == 't.doc_date') {
|
||||||
$sqlwhere[] = $key . '=\'' . $this->db->idate($value) . '\'';
|
$sqlwhere[] = $key . '=\'' . $this->db->idate($value) . '\'';
|
||||||
} elseif ($key == 't.doc_date>=' || $key == 't.doc_date<=') {
|
} elseif ($key == 't.doc_date>=' || $key == 't.doc_date<=') {
|
||||||
@ -1360,7 +1360,7 @@ class BookKeeping extends CommonObject
|
|||||||
|
|
||||||
if (! $resql) {
|
if (! $resql) {
|
||||||
$this->errors[] = "Error " . $this->db->lasterror();
|
$this->errors[] = "Error " . $this->db->lasterror();
|
||||||
foreach ( $this->errors as $errmsg ) {
|
foreach ($this->errors as $errmsg) {
|
||||||
dol_syslog(get_class($this) . "::delete " . $errmsg, LOG_ERR);
|
dol_syslog(get_class($this) . "::delete " . $errmsg, LOG_ERR);
|
||||||
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
||||||
}
|
}
|
||||||
@ -1394,7 +1394,7 @@ class BookKeeping extends CommonObject
|
|||||||
|
|
||||||
if (! $resql) {
|
if (! $resql) {
|
||||||
$this->errors[] = "Error " . $this->db->lasterror();
|
$this->errors[] = "Error " . $this->db->lasterror();
|
||||||
foreach ( $this->errors as $errmsg ) {
|
foreach ($this->errors as $errmsg) {
|
||||||
dol_syslog(get_class($this) . "::delete " . $errmsg, LOG_ERR);
|
dol_syslog(get_class($this) . "::delete " . $errmsg, LOG_ERR);
|
||||||
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -216,7 +216,7 @@ class Lettering extends BookKeeping
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($error) {
|
if ($error) {
|
||||||
foreach ( $this->errors as $errmsg ) {
|
foreach ($this->errors as $errmsg) {
|
||||||
dol_syslog(get_class($this) . "::" . __METHOD__ . $errmsg, LOG_ERR);
|
dol_syslog(get_class($this) . "::" . __METHOD__ . $errmsg, LOG_ERR);
|
||||||
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
||||||
}
|
}
|
||||||
@ -302,7 +302,7 @@ class Lettering extends BookKeeping
|
|||||||
}
|
}
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
if ($error) {
|
if ($error) {
|
||||||
foreach ( $this->errors as $errmsg ) {
|
foreach ($this->errors as $errmsg) {
|
||||||
dol_syslog(get_class($this) . "::update " . $errmsg, LOG_ERR);
|
dol_syslog(get_class($this) . "::update " . $errmsg, LOG_ERR);
|
||||||
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -128,7 +128,7 @@ if ($massaction == 'ventil') {
|
|||||||
$ok=0;
|
$ok=0;
|
||||||
$ko=0;
|
$ko=0;
|
||||||
|
|
||||||
foreach ( $mesCasesCochees as $maLigneCochee ) {
|
foreach ($mesCasesCochees as $maLigneCochee) {
|
||||||
$maLigneCourante = explode("_", $maLigneCochee);
|
$maLigneCourante = explode("_", $maLigneCochee);
|
||||||
$monId = $maLigneCourante[0];
|
$monId = $maLigneCourante[0];
|
||||||
$monCompte = GETPOST('codeventil'.$monId);
|
$monCompte = GETPOST('codeventil'.$monId);
|
||||||
|
|||||||
@ -452,7 +452,7 @@ if (! $error && $action == 'writebookkeeping') {
|
|||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
foreach ( $tabpay as $key => $val ) // $key is rowid into llx_bank
|
foreach ($tabpay as $key => $val) // $key is rowid into llx_bank
|
||||||
{
|
{
|
||||||
$date = dol_print_date($db->jdate($val["date"]), 'day');
|
$date = dol_print_date($db->jdate($val["date"]), 'day');
|
||||||
|
|
||||||
@ -474,7 +474,7 @@ if (! $error && $action == 'writebookkeeping') {
|
|||||||
if (! $errorforline && is_array($tabbq[$key]))
|
if (! $errorforline && is_array($tabbq[$key]))
|
||||||
{
|
{
|
||||||
// Line into bank account
|
// Line into bank account
|
||||||
foreach ( $tabbq[$key] as $k => $mt )
|
foreach ($tabbq[$key] as $k => $mt)
|
||||||
{
|
{
|
||||||
if ($mt)
|
if ($mt)
|
||||||
{
|
{
|
||||||
@ -537,7 +537,7 @@ if (! $error && $action == 'writebookkeeping') {
|
|||||||
if (is_array($tabtp[$key]))
|
if (is_array($tabtp[$key]))
|
||||||
{
|
{
|
||||||
// Line into thirdparty account
|
// Line into thirdparty account
|
||||||
foreach ( $tabtp[$key] as $k => $mt ) {
|
foreach ($tabtp[$key] as $k => $mt) {
|
||||||
if ($mt)
|
if ($mt)
|
||||||
{
|
{
|
||||||
$reflabel = '';
|
$reflabel = '';
|
||||||
@ -672,7 +672,7 @@ if (! $error && $action == 'writebookkeeping') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { // If thirdparty unkown, output the waiting account
|
else { // If thirdparty unkown, output the waiting account
|
||||||
foreach ( $tabbq[$key] as $k => $mt ) {
|
foreach ($tabbq[$key] as $k => $mt) {
|
||||||
if ($mt)
|
if ($mt)
|
||||||
{
|
{
|
||||||
$reflabel = '';
|
$reflabel = '';
|
||||||
@ -800,14 +800,14 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
|
|
||||||
foreach ( $tabpay as $key => $val )
|
foreach ($tabpay as $key => $val)
|
||||||
{
|
{
|
||||||
$date = dol_print_date($db->jdate($val["date"]), 'day');
|
$date = dol_print_date($db->jdate($val["date"]), 'day');
|
||||||
|
|
||||||
$ref = getSourceDocRef($val, $tabtype[$key]);
|
$ref = getSourceDocRef($val, $tabtype[$key]);
|
||||||
|
|
||||||
// Bank
|
// Bank
|
||||||
foreach ( $tabbq[$key] as $k => $mt ) {
|
foreach ($tabbq[$key] as $k => $mt) {
|
||||||
if ($mt)
|
if ($mt)
|
||||||
{
|
{
|
||||||
$reflabel = '';
|
$reflabel = '';
|
||||||
@ -832,7 +832,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
|
|
||||||
// Third party
|
// Third party
|
||||||
if (is_array($tabtp[$key])) {
|
if (is_array($tabtp[$key])) {
|
||||||
foreach ( $tabtp[$key] as $k => $mt ) {
|
foreach ($tabtp[$key] as $k => $mt) {
|
||||||
if ($mt)
|
if ($mt)
|
||||||
{
|
{
|
||||||
$reflabel = '';
|
$reflabel = '';
|
||||||
@ -864,7 +864,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else { // If thirdparty unkown, output the waiting account
|
} else { // If thirdparty unkown, output the waiting account
|
||||||
foreach ( $tabbq[$key] as $k => $mt ) {
|
foreach ($tabbq[$key] as $k => $mt) {
|
||||||
if ($mt)
|
if ($mt)
|
||||||
{
|
{
|
||||||
$reflabel = '';
|
$reflabel = '';
|
||||||
@ -1000,14 +1000,14 @@ if (empty($action) || $action == 'view') {
|
|||||||
|
|
||||||
$r = '';
|
$r = '';
|
||||||
|
|
||||||
foreach ( $tabpay as $key => $val ) // $key is rowid in llx_bank
|
foreach ($tabpay as $key => $val) // $key is rowid in llx_bank
|
||||||
{
|
{
|
||||||
$date = dol_print_date($db->jdate($val["date"]), 'day');
|
$date = dol_print_date($db->jdate($val["date"]), 'day');
|
||||||
|
|
||||||
$ref = getSourceDocRef($val, $tabtype[$key]);
|
$ref = getSourceDocRef($val, $tabtype[$key]);
|
||||||
|
|
||||||
// Bank
|
// Bank
|
||||||
foreach ( $tabbq[$key] as $k => $mt )
|
foreach ($tabbq[$key] as $k => $mt)
|
||||||
{
|
{
|
||||||
if ($mt)
|
if ($mt)
|
||||||
{
|
{
|
||||||
@ -1052,7 +1052,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
|
|
||||||
// Third party
|
// Third party
|
||||||
if (is_array($tabtp[$key])) {
|
if (is_array($tabtp[$key])) {
|
||||||
foreach ( $tabtp[$key] as $k => $mt ) {
|
foreach ($tabtp[$key] as $k => $mt) {
|
||||||
if ($mt)
|
if ($mt)
|
||||||
{
|
{
|
||||||
$reflabel = '';
|
$reflabel = '';
|
||||||
@ -1132,7 +1132,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else { // Waiting account
|
} else { // Waiting account
|
||||||
foreach ( $tabbq[$key] as $k => $mt ) {
|
foreach ($tabbq[$key] as $k => $mt) {
|
||||||
if ($mt)
|
if ($mt)
|
||||||
{
|
{
|
||||||
$reflabel = '';
|
$reflabel = '';
|
||||||
|
|||||||
@ -200,7 +200,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
// Thirdparty
|
// Thirdparty
|
||||||
if (! $errorforline)
|
if (! $errorforline)
|
||||||
{
|
{
|
||||||
foreach ( $tabttc[$key] as $k => $mt ) {
|
foreach ($tabttc[$key] as $k => $mt) {
|
||||||
if ($mt) {
|
if ($mt) {
|
||||||
$bookkeeping = new BookKeeping($db);
|
$bookkeeping = new BookKeeping($db);
|
||||||
$bookkeeping->doc_date = $val["date"];
|
$bookkeeping->doc_date = $val["date"];
|
||||||
@ -251,7 +251,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
// Fees
|
// Fees
|
||||||
if (! $errorforline)
|
if (! $errorforline)
|
||||||
{
|
{
|
||||||
foreach ( $tabht[$key] as $k => $mt ) {
|
foreach ($tabht[$key] as $k => $mt) {
|
||||||
if ($mt) {
|
if ($mt) {
|
||||||
// get compte id and label
|
// get compte id and label
|
||||||
if ($accountingaccount->fetch(null, $k, true)) {
|
if ($accountingaccount->fetch(null, $k, true)) {
|
||||||
@ -309,7 +309,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
if ($numtax == 1) $arrayofvat = $tablocaltax1;
|
if ($numtax == 1) $arrayofvat = $tablocaltax1;
|
||||||
if ($numtax == 2) $arrayofvat = $tablocaltax2;
|
if ($numtax == 2) $arrayofvat = $tablocaltax2;
|
||||||
|
|
||||||
foreach ( $arrayofvat[$key] as $k => $mt ) {
|
foreach ($arrayofvat[$key] as $k => $mt) {
|
||||||
if ($mt) {
|
if ($mt) {
|
||||||
// get compte id and label
|
// get compte id and label
|
||||||
$bookkeeping = new BookKeeping($db);
|
$bookkeeping = new BookKeeping($db);
|
||||||
@ -442,14 +442,14 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
print '"' . $langs->transnoentitiesnoconv("Credit") . '"' . $sep;
|
print '"' . $langs->transnoentitiesnoconv("Credit") . '"' . $sep;
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
foreach ( $taber as $key => $val ) {
|
foreach ($taber as $key => $val) {
|
||||||
$date = dol_print_date($val["date"], 'day');
|
$date = dol_print_date($val["date"], 'day');
|
||||||
|
|
||||||
$userstatic->id = $tabuser[$key]['id'];
|
$userstatic->id = $tabuser[$key]['id'];
|
||||||
$userstatic->name = $tabuser[$key]['name'];
|
$userstatic->name = $tabuser[$key]['name'];
|
||||||
|
|
||||||
// Fees
|
// Fees
|
||||||
foreach ( $tabht[$key] as $k => $mt ) {
|
foreach ($tabht[$key] as $k => $mt) {
|
||||||
$accountingaccount = new AccountingAccount($db);
|
$accountingaccount = new AccountingAccount($db);
|
||||||
$accountingaccount->fetch(null, $k, true);
|
$accountingaccount->fetch(null, $k, true);
|
||||||
if ($mt) {
|
if ($mt) {
|
||||||
@ -463,7 +463,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// VAT
|
// VAT
|
||||||
foreach ( $tabtva[$key] as $k => $mt ) {
|
foreach ($tabtva[$key] as $k => $mt) {
|
||||||
if ($mt) {
|
if ($mt) {
|
||||||
print '"' . $date . '"' . $sep;
|
print '"' . $date . '"' . $sep;
|
||||||
print '"' . $val["ref"] . '"' . $sep;
|
print '"' . $val["ref"] . '"' . $sep;
|
||||||
@ -476,7 +476,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Third party
|
// Third party
|
||||||
foreach ( $tabttc[$key] as $k => $mt ) {
|
foreach ($tabttc[$key] as $k => $mt) {
|
||||||
print '"' . $date . '"' . $sep;
|
print '"' . $date . '"' . $sep;
|
||||||
print '"' . $val["ref"] . '"' . $sep;
|
print '"' . $val["ref"] . '"' . $sep;
|
||||||
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
||||||
@ -564,7 +564,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
$expensereportstatic = new ExpenseReport($db);
|
$expensereportstatic = new ExpenseReport($db);
|
||||||
$expensereportlinestatic = new ExpenseReportLine($db);
|
$expensereportlinestatic = new ExpenseReportLine($db);
|
||||||
|
|
||||||
foreach ( $taber as $key => $val ) {
|
foreach ($taber as $key => $val) {
|
||||||
$expensereportstatic->id = $key;
|
$expensereportstatic->id = $key;
|
||||||
$expensereportstatic->ref = $val["ref"];
|
$expensereportstatic->ref = $val["ref"];
|
||||||
$expensereportlinestatic->comments = html_entity_decode(dol_trunc($val["comments"], 32));
|
$expensereportlinestatic->comments = html_entity_decode(dol_trunc($val["comments"], 32));
|
||||||
@ -572,7 +572,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
$date = dol_print_date($val["date"], 'day');
|
$date = dol_print_date($val["date"], 'day');
|
||||||
|
|
||||||
// Fees
|
// Fees
|
||||||
foreach ( $tabht[$key] as $k => $mt ) {
|
foreach ($tabht[$key] as $k => $mt) {
|
||||||
$accountingaccount = new AccountingAccount($db);
|
$accountingaccount = new AccountingAccount($db);
|
||||||
$accountingaccount->fetch(null, $k, true);
|
$accountingaccount->fetch(null, $k, true);
|
||||||
|
|
||||||
@ -605,7 +605,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Third party
|
// Third party
|
||||||
foreach ( $tabttc[$key] as $k => $mt ) {
|
foreach ($tabttc[$key] as $k => $mt) {
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print "<td><!-- Thirdparty --></td>";
|
print "<td><!-- Thirdparty --></td>";
|
||||||
print "<td>" . $date . "</td>";
|
print "<td>" . $date . "</td>";
|
||||||
@ -643,7 +643,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
if ($numtax == 1) $arrayofvat = $tablocaltax1;
|
if ($numtax == 1) $arrayofvat = $tablocaltax1;
|
||||||
if ($numtax == 2) $arrayofvat = $tablocaltax2;
|
if ($numtax == 2) $arrayofvat = $tablocaltax2;
|
||||||
|
|
||||||
foreach ( $arrayofvat[$key] as $k => $mt ) {
|
foreach ($arrayofvat[$key] as $k => $mt) {
|
||||||
if ($mt) {
|
if ($mt) {
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print "<td><!-- VAT --></td>";
|
print "<td><!-- VAT --></td>";
|
||||||
|
|||||||
@ -94,7 +94,7 @@ if (! GETPOSTISSET('date_startmonth') && (empty($date_start) || empty($date_end)
|
|||||||
|
|
||||||
$idpays = $mysoc->country_id;
|
$idpays = $mysoc->country_id;
|
||||||
|
|
||||||
$sql = "SELECT f.rowid, f.ref, f.type, f.datef as df, f.libelle,f.ref_supplier, f.date_lim_reglement as dlf, f.close_code,";
|
$sql = "SELECT f.rowid, f.ref as ref, f.type, f.datef as df, f.libelle,f.ref_supplier, f.date_lim_reglement as dlf, f.close_code,";
|
||||||
$sql .= " fd.rowid as fdid, fd.description, fd.product_type, fd.total_ht, fd.tva as total_tva, fd.total_localtax1, fd.total_localtax2, fd.tva_tx, fd.total_ttc, fd.vat_src_code,";
|
$sql .= " fd.rowid as fdid, fd.description, fd.product_type, fd.total_ht, fd.tva as total_tva, fd.total_localtax1, fd.total_localtax2, fd.tva_tx, fd.total_ttc, fd.vat_src_code,";
|
||||||
$sql .= " s.rowid as socid, s.nom as name, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,";
|
$sql .= " s.rowid as socid, s.nom as name, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,";
|
||||||
$sql .= " p.accountancy_code_buy , aa.rowid as fk_compte, aa.account_number as compte, aa.label as label_compte";
|
$sql .= " p.accountancy_code_buy , aa.rowid as fk_compte, aa.account_number as compte, aa.label as label_compte";
|
||||||
@ -296,7 +296,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
// Thirdparty
|
// Thirdparty
|
||||||
if (! $errorforline)
|
if (! $errorforline)
|
||||||
{
|
{
|
||||||
foreach ( $tabttc[$key] as $k => $mt ) {
|
foreach ($tabttc[$key] as $k => $mt) {
|
||||||
//if ($mt) {
|
//if ($mt) {
|
||||||
$bookkeeping = new BookKeeping($db);
|
$bookkeeping = new BookKeeping($db);
|
||||||
$bookkeeping->doc_date = $val["date"];
|
$bookkeeping->doc_date = $val["date"];
|
||||||
@ -351,7 +351,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
// Product / Service
|
// Product / Service
|
||||||
if (! $errorforline)
|
if (! $errorforline)
|
||||||
{
|
{
|
||||||
foreach ( $tabht[$key] as $k => $mt ) {
|
foreach ($tabht[$key] as $k => $mt) {
|
||||||
//if ($mt) {
|
//if ($mt) {
|
||||||
// get compte id and label
|
// get compte id and label
|
||||||
if ($accountingaccount->fetch(null, $k, true)) {
|
if ($accountingaccount->fetch(null, $k, true)) {
|
||||||
@ -414,7 +414,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
if ($numtax == 1) $arrayofvat = $tablocaltax1;
|
if ($numtax == 1) $arrayofvat = $tablocaltax1;
|
||||||
if ($numtax == 2) $arrayofvat = $tablocaltax2;
|
if ($numtax == 2) $arrayofvat = $tablocaltax2;
|
||||||
|
|
||||||
foreach ( $arrayofvat[$key] as $k => $mt ) {
|
foreach ($arrayofvat[$key] as $k => $mt) {
|
||||||
if ($mt) {
|
if ($mt) {
|
||||||
$bookkeeping = new BookKeeping($db);
|
$bookkeeping = new BookKeeping($db);
|
||||||
$bookkeeping->doc_date = $val["date"];
|
$bookkeeping->doc_date = $val["date"];
|
||||||
@ -471,7 +471,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
// var_dump($tabother);
|
// var_dump($tabother);
|
||||||
if (! $errorforline && is_array($tabother[$key]))
|
if (! $errorforline && is_array($tabother[$key]))
|
||||||
{
|
{
|
||||||
foreach ( $tabother[$key] as $k => $mt ) {
|
foreach ($tabother[$key] as $k => $mt) {
|
||||||
if ($mt) {
|
if ($mt) {
|
||||||
$bookkeeping = new BookKeeping($db);
|
$bookkeeping = new BookKeeping($db);
|
||||||
$bookkeeping->doc_date = $val["date"];
|
$bookkeeping->doc_date = $val["date"];
|
||||||
@ -593,7 +593,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
$companystatic = new Fournisseur($db);
|
$companystatic = new Fournisseur($db);
|
||||||
$invoicestatic = new FactureFournisseur($db);
|
$invoicestatic = new FactureFournisseur($db);
|
||||||
|
|
||||||
foreach ( $tabfac as $key => $val )
|
foreach ($tabfac as $key => $val)
|
||||||
{
|
{
|
||||||
$companystatic->id = $tabcompany[$key]['id'];
|
$companystatic->id = $tabcompany[$key]['id'];
|
||||||
$companystatic->name = $tabcompany[$key]['name'];
|
$companystatic->name = $tabcompany[$key]['name'];
|
||||||
@ -628,7 +628,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Third party
|
// Third party
|
||||||
foreach ( $tabttc[$key] as $k => $mt ) {
|
foreach ($tabttc[$key] as $k => $mt) {
|
||||||
//if ($mt) {
|
//if ($mt) {
|
||||||
print '"' . $key . '"' . $sep;
|
print '"' . $key . '"' . $sep;
|
||||||
print '"' . $date . '"' . $sep;
|
print '"' . $date . '"' . $sep;
|
||||||
@ -647,7 +647,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Product / Service
|
// Product / Service
|
||||||
foreach ( $tabht[$key] as $k => $mt ) {
|
foreach ($tabht[$key] as $k => $mt) {
|
||||||
$accountingaccount = new AccountingAccount($db);
|
$accountingaccount = new AccountingAccount($db);
|
||||||
$accountingaccount->fetch(null, $k, true);
|
$accountingaccount->fetch(null, $k, true);
|
||||||
//if ($mt) {
|
//if ($mt) {
|
||||||
@ -695,7 +695,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
// VAT counterpart for NPR
|
// VAT counterpart for NPR
|
||||||
if (is_array($tabother[$key]))
|
if (is_array($tabother[$key]))
|
||||||
{
|
{
|
||||||
foreach ( $tabother[$key] as $k => $mt ) {
|
foreach ($tabother[$key] as $k => $mt) {
|
||||||
if ($mt) {
|
if ($mt) {
|
||||||
print '"' . $key . '"' . $sep;
|
print '"' . $key . '"' . $sep;
|
||||||
print '"' . $date . '"' . $sep;
|
print '"' . $date . '"' . $sep;
|
||||||
@ -797,7 +797,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
$invoicestatic = new FactureFournisseur($db);
|
$invoicestatic = new FactureFournisseur($db);
|
||||||
$companystatic = new Fournisseur($db);
|
$companystatic = new Fournisseur($db);
|
||||||
|
|
||||||
foreach ( $tabfac as $key => $val )
|
foreach ($tabfac as $key => $val)
|
||||||
{
|
{
|
||||||
$companystatic->id = $tabcompany[$key]['id'];
|
$companystatic->id = $tabcompany[$key]['id'];
|
||||||
$companystatic->name = $tabcompany[$key]['name'];
|
$companystatic->name = $tabcompany[$key]['name'];
|
||||||
@ -868,7 +868,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Third party
|
// Third party
|
||||||
foreach ( $tabttc[$key] as $k => $mt ) {
|
foreach ($tabttc[$key] as $k => $mt) {
|
||||||
//if ($mt) {
|
//if ($mt) {
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print "<td><!-- Thirdparty --></td>";
|
print "<td><!-- Thirdparty --></td>";
|
||||||
@ -900,7 +900,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Product / Service
|
// Product / Service
|
||||||
foreach ( $tabht[$key] as $k => $mt ) {
|
foreach ($tabht[$key] as $k => $mt) {
|
||||||
$accountingaccount = new AccountingAccount($db);
|
$accountingaccount = new AccountingAccount($db);
|
||||||
$accountingaccount->fetch(null, $k, true);
|
$accountingaccount->fetch(null, $k, true);
|
||||||
|
|
||||||
@ -937,7 +937,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
if ($numtax == 1) $arrayofvat = $tablocaltax1;
|
if ($numtax == 1) $arrayofvat = $tablocaltax1;
|
||||||
if ($numtax == 2) $arrayofvat = $tablocaltax2;
|
if ($numtax == 2) $arrayofvat = $tablocaltax2;
|
||||||
|
|
||||||
foreach ( $arrayofvat[$key] as $k => $mt ) {
|
foreach ($arrayofvat[$key] as $k => $mt) {
|
||||||
if ($mt) {
|
if ($mt) {
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print "<td><!-- VAT --></td>";
|
print "<td><!-- VAT --></td>";
|
||||||
@ -968,7 +968,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
// VAT counterpart for NPR
|
// VAT counterpart for NPR
|
||||||
if (is_array($tabother[$key]))
|
if (is_array($tabother[$key]))
|
||||||
{
|
{
|
||||||
foreach ( $tabother[$key] as $k => $mt ) {
|
foreach ($tabother[$key] as $k => $mt) {
|
||||||
if ($mt) {
|
if ($mt) {
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print "<td><!-- VAT counterpart NPR --></td>";
|
print "<td><!-- VAT counterpart NPR --></td>";
|
||||||
|
|||||||
@ -307,7 +307,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
// Thirdparty
|
// Thirdparty
|
||||||
if (! $errorforline)
|
if (! $errorforline)
|
||||||
{
|
{
|
||||||
foreach ( $tabttc[$key] as $k => $mt ) {
|
foreach ($tabttc[$key] as $k => $mt) {
|
||||||
//if ($mt) {
|
//if ($mt) {
|
||||||
$bookkeeping = new BookKeeping($db);
|
$bookkeeping = new BookKeeping($db);
|
||||||
$bookkeeping->doc_date = $val["date"];
|
$bookkeeping->doc_date = $val["date"];
|
||||||
@ -362,7 +362,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
// Product / Service
|
// Product / Service
|
||||||
if (! $errorforline)
|
if (! $errorforline)
|
||||||
{
|
{
|
||||||
foreach ( $tabht[$key] as $k => $mt ) {
|
foreach ($tabht[$key] as $k => $mt) {
|
||||||
//if ($mt) {
|
//if ($mt) {
|
||||||
// get compte id and label
|
// get compte id and label
|
||||||
if ($accountingaccount->fetch(null, $k, true)) {
|
if ($accountingaccount->fetch(null, $k, true)) {
|
||||||
@ -424,7 +424,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
if ($numtax == 1) $arrayofvat = $tablocaltax1;
|
if ($numtax == 1) $arrayofvat = $tablocaltax1;
|
||||||
if ($numtax == 2) $arrayofvat = $tablocaltax2;
|
if ($numtax == 2) $arrayofvat = $tablocaltax2;
|
||||||
|
|
||||||
foreach ( $arrayofvat[$key] as $k => $mt ) {
|
foreach ($arrayofvat[$key] as $k => $mt) {
|
||||||
if ($mt) {
|
if ($mt) {
|
||||||
$bookkeeping = new BookKeeping($db);
|
$bookkeeping = new BookKeeping($db);
|
||||||
$bookkeeping->doc_date = $val["date"];
|
$bookkeeping->doc_date = $val["date"];
|
||||||
@ -553,7 +553,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
$companystatic = new Client($db);
|
$companystatic = new Client($db);
|
||||||
$invoicestatic = new Facture($db);
|
$invoicestatic = new Facture($db);
|
||||||
|
|
||||||
foreach ( $tabfac as $key => $val )
|
foreach ($tabfac as $key => $val)
|
||||||
{
|
{
|
||||||
$companystatic->id = $tabcompany[$key]['id'];
|
$companystatic->id = $tabcompany[$key]['id'];
|
||||||
$companystatic->name = $tabcompany[$key]['name'];
|
$companystatic->name = $tabcompany[$key]['name'];
|
||||||
@ -734,7 +734,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
$companystatic = new Client($db);
|
$companystatic = new Client($db);
|
||||||
$invoicestatic = new Facture($db);
|
$invoicestatic = new Facture($db);
|
||||||
|
|
||||||
foreach ( $tabfac as $key => $val )
|
foreach ($tabfac as $key => $val)
|
||||||
{
|
{
|
||||||
$companystatic->id = $tabcompany[$key]['id'];
|
$companystatic->id = $tabcompany[$key]['id'];
|
||||||
$companystatic->name = $tabcompany[$key]['name'];
|
$companystatic->name = $tabcompany[$key]['name'];
|
||||||
@ -875,7 +875,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
if ($numtax == 1) $arrayofvat = $tablocaltax1;
|
if ($numtax == 1) $arrayofvat = $tablocaltax1;
|
||||||
if ($numtax == 2) $arrayofvat = $tablocaltax2;
|
if ($numtax == 2) $arrayofvat = $tablocaltax2;
|
||||||
|
|
||||||
foreach ( $arrayofvat[$key] as $k => $mt ) {
|
foreach ($arrayofvat[$key] as $k => $mt) {
|
||||||
if ($mt) {
|
if ($mt) {
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print "<td><!-- VAT --></td>";
|
print "<td><!-- VAT --></td>";
|
||||||
|
|||||||
@ -220,4 +220,4 @@ dol_fiche_end();
|
|||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -57,4 +57,4 @@ $url = $conf->global->BLOCKEDLOG_AUTHORITY_URL.'/blockedlog/ajax/authority.php?s
|
|||||||
|
|
||||||
$res = file_get_contents($url);
|
$res = file_get_contents($url);
|
||||||
//echo $url;
|
//echo $url;
|
||||||
echo $res;
|
echo $res;
|
||||||
|
|||||||
@ -74,7 +74,7 @@ if ( GETPOST('filtre', 'alpha') ) {
|
|||||||
|
|
||||||
while ($i < $conf_taille_listes && $tab = $db->fetch_array($resql) )
|
while ($i < $conf_taille_listes && $tab = $db->fetch_array($resql) )
|
||||||
{
|
{
|
||||||
foreach ( $tab as $cle => $valeur )
|
foreach ($tab as $cle => $valeur)
|
||||||
{
|
{
|
||||||
$ret[$i][$cle] = $valeur;
|
$ret[$i][$cle] = $valeur;
|
||||||
}
|
}
|
||||||
@ -110,7 +110,7 @@ if ( GETPOST('filtre', 'alpha') ) {
|
|||||||
|
|
||||||
while ($i < $conf_taille_listes && $tab = $db->fetch_array($resql))
|
while ($i < $conf_taille_listes && $tab = $db->fetch_array($resql))
|
||||||
{
|
{
|
||||||
foreach ( $tab as $cle => $valeur )
|
foreach ($tab as $cle => $valeur)
|
||||||
{
|
{
|
||||||
$ret[$i][$cle] = $valeur;
|
$ret[$i][$cle] = $valeur;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,7 +76,7 @@ if (dol_strlen($search) >= 0) // If search criteria is on char length at least
|
|||||||
$ret=array(); $i=0;
|
$ret=array(); $i=0;
|
||||||
while ( $tab = $db->fetch_array($result) )
|
while ( $tab = $db->fetch_array($result) )
|
||||||
{
|
{
|
||||||
foreach ( $tab as $cle => $valeur )
|
foreach ($tab as $cle => $valeur)
|
||||||
{
|
{
|
||||||
$ret[$i][$cle] = $valeur;
|
$ret[$i][$cle] = $valeur;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -64,7 +64,7 @@ switch($action)
|
|||||||
{
|
{
|
||||||
$ret=array();
|
$ret=array();
|
||||||
$tab = $db->fetch_array($result);
|
$tab = $db->fetch_array($result);
|
||||||
foreach ( $tab as $key => $value )
|
foreach ($tab as $key => $value)
|
||||||
{
|
{
|
||||||
$ret[$key] = $value;
|
$ret[$key] = $value;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -107,7 +107,7 @@ if ( $retour >= 0 )
|
|||||||
{
|
{
|
||||||
$tab = $db->fetch_array($res);
|
$tab = $db->fetch_array($res);
|
||||||
|
|
||||||
foreach ( $tab as $key => $value )
|
foreach ($tab as $key => $value)
|
||||||
{
|
{
|
||||||
$return[$key] = $value;
|
$return[$key] = $value;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -110,7 +110,7 @@ $cancel != $langs->trans("Cancel") &&
|
|||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$current_lang = $langs->getDefaultLang();
|
$current_lang = $langs->getDefaultLang();
|
||||||
|
|
||||||
foreach ( $object->multilangs as $key => $value ) // enregistrement des nouvelles valeurs dans l'objet
|
foreach ($object->multilangs as $key => $value) // enregistrement des nouvelles valeurs dans l'objet
|
||||||
{
|
{
|
||||||
if ( $key == $current_lang )
|
if ( $key == $current_lang )
|
||||||
{
|
{
|
||||||
|
|||||||
@ -121,7 +121,7 @@ if ($action == 'add') {
|
|||||||
|
|
||||||
// Get extra fields
|
// Get extra fields
|
||||||
|
|
||||||
foreach ( $_POST as $key => $value ) {
|
foreach ($_POST as $key => $value) {
|
||||||
// print '$key='.$key.' $value='.$value.'<BR>';
|
// print '$key='.$key.' $value='.$value.'<BR>';
|
||||||
if (preg_match("/^options_.*(?<!_cnct)$/", $key)) {
|
if (preg_match("/^options_.*(?<!_cnct)$/", $key)) {
|
||||||
// Special case for start date come with 3 inputs day, month, year
|
// Special case for start date come with 3 inputs day, month, year
|
||||||
@ -177,7 +177,7 @@ if ($action == 'add') {
|
|||||||
'contact_create_st_dt',
|
'contact_create_st_dt',
|
||||||
'contact_create_end_dt'
|
'contact_create_end_dt'
|
||||||
);
|
);
|
||||||
foreach ( $specials_date_key as $date_key ) {
|
foreach ($specials_date_key as $date_key) {
|
||||||
if ($key == $date_key) {
|
if ($key == $date_key) {
|
||||||
$dt = GETPOST($date_key);
|
$dt = GETPOST($date_key);
|
||||||
if (! empty($dt)) {
|
if (! empty($dt)) {
|
||||||
@ -276,7 +276,7 @@ if ($action == 'savefilter' || $action == 'createfilter') {
|
|||||||
$array_query = array ();
|
$array_query = array ();
|
||||||
|
|
||||||
// Get extra fields
|
// Get extra fields
|
||||||
foreach ( $_POST as $key => $value ) {
|
foreach ($_POST as $key => $value) {
|
||||||
if (preg_match("/^options_.*(?<!_cnct)$/", $key)) {
|
if (preg_match("/^options_.*(?<!_cnct)$/", $key)) {
|
||||||
// Special case for start date come with 3 inputs day, month, year
|
// Special case for start date come with 3 inputs day, month, year
|
||||||
if (preg_match("/st_dt/", $key)) {
|
if (preg_match("/st_dt/", $key)) {
|
||||||
@ -334,7 +334,7 @@ if ($action == 'savefilter' || $action == 'createfilter') {
|
|||||||
'contact_create_st_dt',
|
'contact_create_st_dt',
|
||||||
'contact_create_end_dt'
|
'contact_create_end_dt'
|
||||||
);
|
);
|
||||||
foreach ( $specials_date_key as $date_key ) {
|
foreach ($specials_date_key as $date_key) {
|
||||||
if ($key == $date_key) {
|
if ($key == $date_key) {
|
||||||
$dt = GETPOST($date_key);
|
$dt = GETPOST($date_key);
|
||||||
if (! empty($dt)) {
|
if (! empty($dt)) {
|
||||||
|
|||||||
@ -319,6 +319,7 @@ class Mailing extends CommonObject
|
|||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
$this->error=$object->error;
|
$this->error=$object->error;
|
||||||
|
$this->errors=array_merge($this->errors, $object->errors);
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1285,7 +1285,12 @@ class Propal extends CommonObject
|
|||||||
// Create clone
|
// Create clone
|
||||||
$object->context['createfromclone']='createfromclone';
|
$object->context['createfromclone']='createfromclone';
|
||||||
$result=$object->create($user);
|
$result=$object->create($user);
|
||||||
if ($result < 0) $error++;
|
if ($result < 0)
|
||||||
|
{
|
||||||
|
$this->error = $object->error;
|
||||||
|
$this->errors = array_merge($this->errors, $object->errors);
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -426,4 +426,4 @@ class CashControl extends CommonObject
|
|||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2454,7 +2454,7 @@ class Contrat extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (! $error) {
|
if (! $error) {
|
||||||
foreach ( $this->lines as $line ) {
|
foreach ($this->lines as $line) {
|
||||||
$result = $clonedObj->addline($line->desc, $line->subprice, $line->qty, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, $line->fk_product, $line->remise_percent, $line->date_ouverture, $line->date_cloture, 'HT', 0, $line->info_bits, $line->fk_fournprice, $line->pa_ht, $line->array_options, $line->fk_unit);
|
$result = $clonedObj->addline($line->desc, $line->subprice, $line->qty, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, $line->fk_product, $line->remise_percent, $line->date_ouverture, $line->date_cloture, 'HT', 0, $line->info_bits, $line->fk_fournprice, $line->pa_ht, $line->array_options, $line->fk_unit);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
$error ++;
|
$error ++;
|
||||||
|
|||||||
@ -73,4 +73,4 @@ if ($action == 'deletecomment')
|
|||||||
$action='';
|
$action='';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5015,7 +5015,7 @@ abstract class CommonObject
|
|||||||
if ($this->array_options[$key] === '') $mandatorypb=true;
|
if ($this->array_options[$key] === '') $mandatorypb=true;
|
||||||
if ($mandatorypb)
|
if ($mandatorypb)
|
||||||
{
|
{
|
||||||
dol_syslog($this->error);
|
dol_syslog("Mandatory extra field ".$key." is empty");
|
||||||
$this->errors[]=$langs->trans('ErrorFieldRequired', $attributeLabel);
|
$this->errors[]=$langs->trans('ErrorFieldRequired', $attributeLabel);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -5835,7 +5835,7 @@ abstract class CommonObject
|
|||||||
$fields_label = explode('|', $InfoFieldList[1]);
|
$fields_label = explode('|', $InfoFieldList[1]);
|
||||||
if (is_array($fields_label)) {
|
if (is_array($fields_label)) {
|
||||||
$notrans = true;
|
$notrans = true;
|
||||||
foreach ( $fields_label as $field_toshow ) {
|
foreach ($fields_label as $field_toshow) {
|
||||||
$labeltoshow .= $obj->$field_toshow . ' ';
|
$labeltoshow .= $obj->$field_toshow . ' ';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -5844,7 +5844,7 @@ abstract class CommonObject
|
|||||||
$labeltoshow = dol_trunc($labeltoshow, 45);
|
$labeltoshow = dol_trunc($labeltoshow, 45);
|
||||||
|
|
||||||
if (is_array($value_arr) && in_array($obj->rowid, $value_arr)) {
|
if (is_array($value_arr) && in_array($obj->rowid, $value_arr)) {
|
||||||
foreach ( $fields_label as $field_toshow ) {
|
foreach ($fields_label as $field_toshow) {
|
||||||
$translabel = $langs->trans($obj->$field_toshow);
|
$translabel = $langs->trans($obj->$field_toshow);
|
||||||
if ($translabel != $obj->$field_toshow) {
|
if ($translabel != $obj->$field_toshow) {
|
||||||
$labeltoshow = dol_trunc($translabel, 18) . ' ';
|
$labeltoshow = dol_trunc($translabel, 18) . ' ';
|
||||||
@ -6244,7 +6244,7 @@ abstract class CommonObject
|
|||||||
$fields_label = explode('|', $InfoFieldList[1]);
|
$fields_label = explode('|', $InfoFieldList[1]);
|
||||||
if (is_array($value_arr) && in_array($obj->rowid, $value_arr)) {
|
if (is_array($value_arr) && in_array($obj->rowid, $value_arr)) {
|
||||||
if (is_array($fields_label) && count($fields_label) > 1) {
|
if (is_array($fields_label) && count($fields_label) > 1) {
|
||||||
foreach ( $fields_label as $field_toshow ) {
|
foreach ($fields_label as $field_toshow) {
|
||||||
$translabel = '';
|
$translabel = '';
|
||||||
if (! empty($obj->$field_toshow)) {
|
if (! empty($obj->$field_toshow)) {
|
||||||
$translabel = $langs->trans($obj->$field_toshow);
|
$translabel = $langs->trans($obj->$field_toshow);
|
||||||
|
|||||||
@ -447,4 +447,4 @@ class EmailSenderProfileLine
|
|||||||
// @var mixed Sample line property 2
|
// @var mixed Sample line property 2
|
||||||
public $prop2;
|
public $prop2;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1424,7 +1424,7 @@ class ExtraFields
|
|||||||
$fields_label = explode('|', $InfoFieldList[1]);
|
$fields_label = explode('|', $InfoFieldList[1]);
|
||||||
if (is_array($fields_label)) {
|
if (is_array($fields_label)) {
|
||||||
$notrans = true;
|
$notrans = true;
|
||||||
foreach ( $fields_label as $field_toshow ) {
|
foreach ($fields_label as $field_toshow) {
|
||||||
$labeltoshow .= $obj->$field_toshow . ' ';
|
$labeltoshow .= $obj->$field_toshow . ' ';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1433,7 +1433,7 @@ class ExtraFields
|
|||||||
$labeltoshow = dol_trunc($labeltoshow, 45);
|
$labeltoshow = dol_trunc($labeltoshow, 45);
|
||||||
|
|
||||||
if (is_array($value_arr) && in_array($obj->rowid, $value_arr)) {
|
if (is_array($value_arr) && in_array($obj->rowid, $value_arr)) {
|
||||||
foreach ( $fields_label as $field_toshow ) {
|
foreach ($fields_label as $field_toshow) {
|
||||||
$translabel = $langs->trans($obj->$field_toshow);
|
$translabel = $langs->trans($obj->$field_toshow);
|
||||||
if ($translabel != $obj->$field_toshow) {
|
if ($translabel != $obj->$field_toshow) {
|
||||||
$labeltoshow = dol_trunc($translabel, 18) . ' ';
|
$labeltoshow = dol_trunc($translabel, 18) . ' ';
|
||||||
@ -1731,7 +1731,7 @@ class ExtraFields
|
|||||||
$fields_label = explode('|', $InfoFieldList[1]);
|
$fields_label = explode('|', $InfoFieldList[1]);
|
||||||
if (is_array($value_arr) && in_array($obj->rowid, $value_arr)) {
|
if (is_array($value_arr) && in_array($obj->rowid, $value_arr)) {
|
||||||
if (is_array($fields_label) && count($fields_label) > 1) {
|
if (is_array($fields_label) && count($fields_label) > 1) {
|
||||||
foreach ( $fields_label as $field_toshow ) {
|
foreach ($fields_label as $field_toshow) {
|
||||||
$translabel = '';
|
$translabel = '';
|
||||||
if (! empty($obj->$field_toshow)) {
|
if (! empty($obj->$field_toshow)) {
|
||||||
$translabel = $langs->trans($obj->$field_toshow);
|
$translabel = $langs->trans($obj->$field_toshow);
|
||||||
|
|||||||
@ -580,7 +580,7 @@ class SMTPs
|
|||||||
// 'RCPT TO:' must be given a single address, so this has to loop
|
// 'RCPT TO:' must be given a single address, so this has to loop
|
||||||
// through the list of addresses, regardless of TO, CC or BCC
|
// through the list of addresses, regardless of TO, CC or BCC
|
||||||
// and send it out "single file"
|
// and send it out "single file"
|
||||||
foreach ( $this->get_RCPT_list() as $_address )
|
foreach ($this->get_RCPT_list() as $_address)
|
||||||
{
|
{
|
||||||
/* Note:
|
/* Note:
|
||||||
* BCC email addresses must be listed in the RCPT TO command list,
|
* BCC email addresses must be listed in the RCPT TO command list,
|
||||||
@ -1006,7 +1006,7 @@ class SMTPs
|
|||||||
}
|
}
|
||||||
|
|
||||||
// take the array of addresses and split them further
|
// take the array of addresses and split them further
|
||||||
foreach ( $_addrList as $_strAddr )
|
foreach ($_addrList as $_strAddr)
|
||||||
{
|
{
|
||||||
// Strip off the end '>'
|
// Strip off the end '>'
|
||||||
$_strAddr = str_replace('>', '', $_strAddr);
|
$_strAddr = str_replace('>', '', $_strAddr);
|
||||||
@ -1110,11 +1110,11 @@ class SMTPs
|
|||||||
$_RCPT_list=array();
|
$_RCPT_list=array();
|
||||||
|
|
||||||
// walk down Recipients array and pull just email addresses
|
// walk down Recipients array and pull just email addresses
|
||||||
foreach ( $this->_msgRecipients as $_host => $_list )
|
foreach ($this->_msgRecipients as $_host => $_list)
|
||||||
{
|
{
|
||||||
foreach ( $_list as $_subList )
|
foreach ($_list as $_subList)
|
||||||
{
|
{
|
||||||
foreach ( $_subList as $_name => $_addr )
|
foreach ($_subList as $_name => $_addr)
|
||||||
{
|
{
|
||||||
// build RCPT list
|
// build RCPT list
|
||||||
$_RCPT_list[] = $_name . '@' . $_host;
|
$_RCPT_list[] = $_name . '@' . $_host;
|
||||||
@ -1143,11 +1143,11 @@ class SMTPs
|
|||||||
{
|
{
|
||||||
$_RCPT_list=array();
|
$_RCPT_list=array();
|
||||||
// walk down Recipients array and pull just email addresses
|
// walk down Recipients array and pull just email addresses
|
||||||
foreach ( $this->_msgRecipients as $_host => $_list )
|
foreach ($this->_msgRecipients as $_host => $_list)
|
||||||
{
|
{
|
||||||
if ( $this->_msgRecipients[$_host][$_which] )
|
if ( $this->_msgRecipients[$_host][$_which] )
|
||||||
{
|
{
|
||||||
foreach ( $this->_msgRecipients[$_host][$_which] as $_addr => $_realName )
|
foreach ($this->_msgRecipients[$_host][$_which] as $_addr => $_realName)
|
||||||
{
|
{
|
||||||
if ( $_realName ) // @CHANGE LDR
|
if ( $_realName ) // @CHANGE LDR
|
||||||
{
|
{
|
||||||
@ -1459,12 +1459,12 @@ class SMTPs
|
|||||||
|
|
||||||
|
|
||||||
// Loop through message content array
|
// Loop through message content array
|
||||||
foreach ($this->_msgContent as $type => $_content )
|
foreach ($this->_msgContent as $type => $_content)
|
||||||
{
|
{
|
||||||
if ( $type == 'attachment' )
|
if ( $type == 'attachment' )
|
||||||
{
|
{
|
||||||
// loop through all attachments
|
// loop through all attachments
|
||||||
foreach ( $_content as $_file => $_data )
|
foreach ($_content as $_file => $_data)
|
||||||
{
|
{
|
||||||
$content .= "--" . $this->_getBoundary('mixed') . "\r\n"
|
$content .= "--" . $this->_getBoundary('mixed') . "\r\n"
|
||||||
. 'Content-Disposition: attachment; filename="' . $_data['fileName'] . '"' . "\r\n"
|
. 'Content-Disposition: attachment; filename="' . $_data['fileName'] . '"' . "\r\n"
|
||||||
@ -1482,7 +1482,7 @@ class SMTPs
|
|||||||
elseif ( $type == 'image' )
|
elseif ( $type == 'image' )
|
||||||
{
|
{
|
||||||
// loop through all images
|
// loop through all images
|
||||||
foreach ( $_content as $_image => $_data )
|
foreach ($_content as $_image => $_data)
|
||||||
{
|
{
|
||||||
$content .= "--" . $this->_getBoundary('related') . "\r\n"; // always related for an inline image
|
$content .= "--" . $this->_getBoundary('related') . "\r\n"; // always related for an inline image
|
||||||
|
|
||||||
@ -1847,7 +1847,7 @@ class SMTPs
|
|||||||
|
|
||||||
if (is_array($this->_smtpsErrors))
|
if (is_array($this->_smtpsErrors))
|
||||||
{
|
{
|
||||||
foreach ( $this->_smtpsErrors as $_err => $_info )
|
foreach ($this->_smtpsErrors as $_err => $_info)
|
||||||
{
|
{
|
||||||
$_errMsg[] = 'Error [' . $_info['num'] .']: '. $_info['msg'];
|
$_errMsg[] = 'Error [' . $_info['num'] .']: '. $_info['msg'];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,7 +53,7 @@ function GetFolders($resourceType, $currentFolder)
|
|||||||
echo "<Folders>" ;
|
echo "<Folders>" ;
|
||||||
|
|
||||||
natcasesort($aFolders);
|
natcasesort($aFolders);
|
||||||
foreach ( $aFolders as $sFolder )
|
foreach ($aFolders as $sFolder)
|
||||||
echo $sFolder ;
|
echo $sFolder ;
|
||||||
|
|
||||||
// Close the "Folders" node.
|
// Close the "Folders" node.
|
||||||
@ -110,7 +110,7 @@ function GetFoldersAndFiles($resourceType, $currentFolder)
|
|||||||
natcasesort($aFolders);
|
natcasesort($aFolders);
|
||||||
echo '<Folders>' ;
|
echo '<Folders>' ;
|
||||||
|
|
||||||
foreach ( $aFolders as $sFolder )
|
foreach ($aFolders as $sFolder)
|
||||||
echo $sFolder ;
|
echo $sFolder ;
|
||||||
|
|
||||||
echo '</Folders>' ;
|
echo '</Folders>' ;
|
||||||
@ -119,7 +119,7 @@ function GetFoldersAndFiles($resourceType, $currentFolder)
|
|||||||
natcasesort($aFiles);
|
natcasesort($aFiles);
|
||||||
echo '<Files>' ;
|
echo '<Files>' ;
|
||||||
|
|
||||||
foreach ( $aFiles as $sFiles )
|
foreach ($aFiles as $sFiles)
|
||||||
echo $sFiles ;
|
echo $sFiles ;
|
||||||
|
|
||||||
echo '</Files>' ;
|
echo '</Files>' ;
|
||||||
|
|||||||
@ -117,7 +117,7 @@ function IsHtmlExtension($ext, $formExtensions)
|
|||||||
return false ;
|
return false ;
|
||||||
}
|
}
|
||||||
$lcaseHtmlExtensions = array();
|
$lcaseHtmlExtensions = array();
|
||||||
foreach ( $formExtensions as $key => $val )
|
foreach ($formExtensions as $key => $val)
|
||||||
{
|
{
|
||||||
$lcaseHtmlExtensions[$key] = strtolower($val);
|
$lcaseHtmlExtensions[$key] = strtolower($val);
|
||||||
}
|
}
|
||||||
@ -162,7 +162,7 @@ function DetectHtml($filePath)
|
|||||||
|
|
||||||
$tags = array( '<body', '<head', '<html', '<img', '<pre', '<script', '<table', '<title' );
|
$tags = array( '<body', '<head', '<html', '<img', '<pre', '<script', '<table', '<title' );
|
||||||
|
|
||||||
foreach( $tags as $tag )
|
foreach($tags as $tag)
|
||||||
{
|
{
|
||||||
if( false !== strpos($chunk, $tag) )
|
if( false !== strpos($chunk, $tag) )
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1713,7 +1713,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
|||||||
$out.='<td width="120">'.$contactstatic->getNomUrl(1, '', 10).'</td>';
|
$out.='<td width="120">'.$contactstatic->getNomUrl(1, '', 10).'</td>';
|
||||||
} elseif (isset($histo[$key]['socpeopleassigned']) && is_array($histo[$key]['socpeopleassigned']) && count($histo[$key]['socpeopleassigned']) > 0) {
|
} elseif (isset($histo[$key]['socpeopleassigned']) && is_array($histo[$key]['socpeopleassigned']) && count($histo[$key]['socpeopleassigned']) > 0) {
|
||||||
$out .= '<td>';
|
$out .= '<td>';
|
||||||
foreach ( $histo[$key]['socpeopleassigned'] as $cid => $Tab ) {
|
foreach ($histo[$key]['socpeopleassigned'] as $cid => $Tab) {
|
||||||
$contact = new Contact($db);
|
$contact = new Contact($db);
|
||||||
$result = $contact->fetch($cid);
|
$result = $contact->fetch($cid);
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 2012-2016 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2012-2016 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
|
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -2654,11 +2655,11 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
|
|||||||
if (! empty($conf->productbatch->enabled)) $original_file=$conf->productbatch->multidir_output[$entity].'/'.$original_file;
|
if (! empty($conf->productbatch->enabled)) $original_file=$conf->productbatch->multidir_output[$entity].'/'.$original_file;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping pour les mouvements stocks
|
// Wrapping for stock movements
|
||||||
else if ($modulepart == 'movement' || $modulepart == 'mouvement' )
|
elseif ($modulepart == 'movement' || $modulepart == 'mouvement')
|
||||||
{
|
{
|
||||||
if (empty($entity) || (empty($conf->stock->multidir_output[$entity]) )) return array('accessallowed'=>0, 'error'=>'Value entity must be provided');
|
if (empty($entity) || empty($conf->stock->multidir_output[$entity])) return array('accessallowed'=>0, 'error'=>'Value entity must be provided');
|
||||||
if (($fuser->rights->stock->{$lire} || $fuser->rights->stock->movement->{$lire} || $fuser->rights->stock->mouvement->{$lire}) || preg_match('/^specimen/i', $original_file))
|
if (($fuser->rights->stock->{$lire} || $fuser->rights->stock->movement->{$lire} || $fuser->rights->stock->mouvement->{$lire}) || preg_match('/^specimen/i', $original_file))
|
||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,4 +53,4 @@ function fiscalyear_prepare_head(Fiscalyear $object)
|
|||||||
complete_head_from_modules($conf, $langs, $object, $head, $h, 'fiscalyear', 'remove');
|
complete_head_from_modules($conf, $langs, $object, $head, $h, 'fiscalyear', 'remove');
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -911,10 +911,10 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
//Local tax 1 before VAT
|
//Local tax 1 before VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||||
//{
|
//{
|
||||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
if ($tvakey!=0) // On affiche pas taux 0
|
if ($tvakey!=0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
@ -942,10 +942,10 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
//Local tax 2 before VAT
|
//Local tax 2 before VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||||
//{
|
//{
|
||||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
foreach($this->localtax2 as $localtax_type => $localtax_rate)
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
if ($tvakey!=0) // On affiche pas taux 0
|
if ($tvakey!=0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
@ -1000,11 +1000,11 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
//Local tax 1 after VAT
|
//Local tax 1 after VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||||
//{
|
//{
|
||||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||||
|
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
if ($tvakey != 0) // On affiche pas taux 0
|
if ($tvakey != 0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
@ -1032,11 +1032,11 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
//Local tax 2 after VAT
|
//Local tax 2 after VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||||
//{
|
//{
|
||||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
foreach($this->localtax2 as $localtax_type => $localtax_rate)
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||||
|
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
if ($tvakey != 0) // On affiche pas taux 0
|
if ($tvakey != 0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
|
|||||||
@ -969,10 +969,10 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
//Local tax 1 before VAT
|
//Local tax 1 before VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||||
//{
|
//{
|
||||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
if ($tvakey!=0) // On affiche pas taux 0
|
if ($tvakey!=0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
@ -1000,10 +1000,10 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
//Local tax 2 before VAT
|
//Local tax 2 before VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||||
//{
|
//{
|
||||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
foreach($this->localtax2 as $localtax_type => $localtax_rate)
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
if ($tvakey!=0) // On affiche pas taux 0
|
if ($tvakey!=0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
@ -1058,11 +1058,11 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
//Local tax 1 after VAT
|
//Local tax 1 after VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||||
//{
|
//{
|
||||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||||
|
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
if ($tvakey != 0) // On affiche pas taux 0
|
if ($tvakey != 0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
@ -1090,11 +1090,11 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
//Local tax 2 after VAT
|
//Local tax 2 after VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||||
//{
|
//{
|
||||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
foreach($this->localtax2 as $localtax_type => $localtax_rate)
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||||
|
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
if ($tvakey != 0) // On affiche pas taux 0
|
if ($tvakey != 0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1143,11 +1143,11 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
//Local tax 1 before VAT
|
//Local tax 1 before VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||||
//{
|
//{
|
||||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
||||||
|
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
if ($tvakey!=0) // On affiche pas taux 0
|
if ($tvakey!=0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
@ -1176,11 +1176,11 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
//Local tax 2 before VAT
|
//Local tax 2 before VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||||
//{
|
//{
|
||||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
foreach($this->localtax2 as $localtax_type => $localtax_rate)
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
||||||
|
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
if ($tvakey!=0) // On affiche pas taux 0
|
if ($tvakey!=0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
@ -1254,11 +1254,11 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
//Local tax 1 after VAT
|
//Local tax 1 after VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||||
//{
|
//{
|
||||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||||
|
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
if ($tvakey != 0) // On affiche pas taux 0
|
if ($tvakey != 0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
@ -1286,11 +1286,11 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
//Local tax 2 after VAT
|
//Local tax 2 after VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||||
//{
|
//{
|
||||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
foreach($this->localtax2 as $localtax_type => $localtax_rate)
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||||
|
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
// retrieve global local tax
|
// retrieve global local tax
|
||||||
if ($tvakey != 0) // On affiche pas taux 0
|
if ($tvakey != 0) // On affiche pas taux 0
|
||||||
|
|||||||
@ -1205,11 +1205,11 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
//Local tax 1 before VAT
|
//Local tax 1 before VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||||
//{
|
//{
|
||||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
||||||
|
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
if ($tvakey!=0) // On affiche pas taux 0
|
if ($tvakey!=0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
@ -1238,11 +1238,11 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
//Local tax 2 before VAT
|
//Local tax 2 before VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||||
//{
|
//{
|
||||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
foreach($this->localtax2 as $localtax_type => $localtax_rate)
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
||||||
|
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
if ($tvakey!=0) // On affiche pas taux 0
|
if ($tvakey!=0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
@ -1316,11 +1316,11 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
//Local tax 1 after VAT
|
//Local tax 1 after VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||||
//{
|
//{
|
||||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||||
|
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
if ($tvakey != 0) // On affiche pas taux 0
|
if ($tvakey != 0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
@ -1348,11 +1348,11 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
//Local tax 2 after VAT
|
//Local tax 2 after VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||||
//{
|
//{
|
||||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
foreach($this->localtax2 as $localtax_type => $localtax_rate)
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||||
|
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
// retrieve global local tax
|
// retrieve global local tax
|
||||||
if ($tvakey != 0) // On affiche pas taux 0
|
if ($tvakey != 0) // On affiche pas taux 0
|
||||||
|
|||||||
@ -162,4 +162,4 @@ class modDon extends DolibarrModules
|
|||||||
|
|
||||||
return $this->_init($sql, $options);
|
return $this->_init($sql, $options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -257,4 +257,4 @@ class modSupplierProposal extends DolibarrModules
|
|||||||
|
|
||||||
return $this->_remove($sql, $options);
|
return $this->_remove($sql, $options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -296,7 +296,7 @@ class printing_printipp extends PrintingDriver
|
|||||||
$jobs = $ipp->jobs_attributes;
|
$jobs = $ipp->jobs_attributes;
|
||||||
|
|
||||||
//$html .= '<pre>'.print_r($jobs,true).'</pre>';
|
//$html .= '<pre>'.print_r($jobs,true).'</pre>';
|
||||||
foreach ($jobs as $value ) {
|
foreach ($jobs as $value) {
|
||||||
$html .= '<tr class="oddeven">';
|
$html .= '<tr class="oddeven">';
|
||||||
$html .= '<td>'.$value->job_id->_value0.'</td>';
|
$html .= '<td>'.$value->job_id->_value0.'</td>';
|
||||||
$html .= '<td>'.$value->job_originating_user_name->_value0.'</td>';
|
$html .= '<td>'.$value->job_originating_user_name->_value0.'</td>';
|
||||||
|
|||||||
@ -734,7 +734,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/product/class/propalmergepdfproduct.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/product/class/propalmergepdfproduct.class.php';
|
||||||
|
|
||||||
$already_merged = array ();
|
$already_merged = array ();
|
||||||
foreach ( $object->lines as $line ) {
|
foreach ($object->lines as $line) {
|
||||||
if (! empty($line->fk_product) && ! (in_array($line->fk_product, $already_merged))) {
|
if (! empty($line->fk_product) && ! (in_array($line->fk_product, $already_merged))) {
|
||||||
// Find the desire PDF
|
// Find the desire PDF
|
||||||
$filetomerge = new Propalmergepdfproduct($this->db);
|
$filetomerge = new Propalmergepdfproduct($this->db);
|
||||||
@ -758,7 +758,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
|
|
||||||
// If PDF is selected and file is not empty
|
// If PDF is selected and file is not empty
|
||||||
if (count($filetomerge->lines) > 0) {
|
if (count($filetomerge->lines) > 0) {
|
||||||
foreach ( $filetomerge->lines as $linefile ) {
|
foreach ($filetomerge->lines as $linefile) {
|
||||||
if (! empty($linefile->id) && ! empty($linefile->file_name)) {
|
if (! empty($linefile->id) && ! empty($linefile->file_name)) {
|
||||||
|
|
||||||
|
|
||||||
@ -1088,11 +1088,11 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
//Local tax 1 before VAT
|
//Local tax 1 before VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||||
//{
|
//{
|
||||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
||||||
|
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
if ($tvakey!=0) // On affiche pas taux 0
|
if ($tvakey!=0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
@ -1120,11 +1120,11 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
//Local tax 2 before VAT
|
//Local tax 2 before VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||||
//{
|
//{
|
||||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
foreach($this->localtax2 as $localtax_type => $localtax_rate)
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
||||||
|
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
if ($tvakey!=0) // On affiche pas taux 0
|
if ($tvakey!=0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
@ -1179,11 +1179,11 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
//Local tax 1 after VAT
|
//Local tax 1 after VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||||
//{
|
//{
|
||||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||||
|
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
if ($tvakey != 0) // On affiche pas taux 0
|
if ($tvakey != 0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
@ -1211,11 +1211,11 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
//Local tax 2 after VAT
|
//Local tax 2 after VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||||
//{
|
//{
|
||||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
foreach($this->localtax2 as $localtax_type => $localtax_rate)
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||||
|
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
// retrieve global local tax
|
// retrieve global local tax
|
||||||
if ($tvakey != 0) // On affiche pas taux 0
|
if ($tvakey != 0) // On affiche pas taux 0
|
||||||
|
|||||||
@ -775,7 +775,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/product/class/propalmergepdfproduct.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/product/class/propalmergepdfproduct.class.php';
|
||||||
|
|
||||||
$already_merged = array ();
|
$already_merged = array ();
|
||||||
foreach ( $object->lines as $line ) {
|
foreach ($object->lines as $line) {
|
||||||
if (! empty($line->fk_product) && ! (in_array($line->fk_product, $already_merged))) {
|
if (! empty($line->fk_product) && ! (in_array($line->fk_product, $already_merged))) {
|
||||||
// Find the desire PDF
|
// Find the desire PDF
|
||||||
$filetomerge = new Propalmergepdfproduct($this->db);
|
$filetomerge = new Propalmergepdfproduct($this->db);
|
||||||
@ -799,7 +799,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
|
|
||||||
// If PDF is selected and file is not empty
|
// If PDF is selected and file is not empty
|
||||||
if (count($filetomerge->lines) > 0) {
|
if (count($filetomerge->lines) > 0) {
|
||||||
foreach ( $filetomerge->lines as $linefile ) {
|
foreach ($filetomerge->lines as $linefile) {
|
||||||
if (! empty($linefile->id) && ! empty($linefile->file_name)) {
|
if (! empty($linefile->id) && ! empty($linefile->file_name)) {
|
||||||
|
|
||||||
|
|
||||||
@ -1122,11 +1122,11 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
//Local tax 1 before VAT
|
//Local tax 1 before VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||||
//{
|
//{
|
||||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
||||||
|
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
if ($tvakey!=0) // On affiche pas taux 0
|
if ($tvakey!=0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
@ -1154,11 +1154,11 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
//Local tax 2 before VAT
|
//Local tax 2 before VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||||
//{
|
//{
|
||||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
foreach($this->localtax2 as $localtax_type => $localtax_rate)
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
||||||
|
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
if ($tvakey!=0) // On affiche pas taux 0
|
if ($tvakey!=0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
@ -1213,11 +1213,11 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
//Local tax 1 after VAT
|
//Local tax 1 after VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||||
//{
|
//{
|
||||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||||
|
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
if ($tvakey != 0) // On affiche pas taux 0
|
if ($tvakey != 0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
@ -1245,11 +1245,11 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
//Local tax 2 after VAT
|
//Local tax 2 after VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||||
//{
|
//{
|
||||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
foreach($this->localtax2 as $localtax_type => $localtax_rate)
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||||
|
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
// retrieve global local tax
|
// retrieve global local tax
|
||||||
if ($tvakey != 0) // On affiche pas taux 0
|
if ($tvakey != 0) // On affiche pas taux 0
|
||||||
|
|||||||
@ -519,4 +519,4 @@ class doc_generic_reception_odt extends ModelePdfReception
|
|||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -143,4 +143,4 @@ class mod_reception_beryl extends ModelNumRefReception
|
|||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
return $this->getNextValue($objsoc, $objforref);
|
return $this->getNextValue($objsoc, $objforref);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -134,4 +134,4 @@ class mod_reception_moonstone extends ModelNumRefReception
|
|||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
return $this->getNextValue($objsoc, $objforref);
|
return $this->getNextValue($objsoc, $objforref);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -656,7 +656,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
// Show VAT by rates and total
|
// Show VAT by rates and total
|
||||||
$pdf->SetFillColor(248, 248, 248);
|
$pdf->SetFillColor(248, 248, 248);
|
||||||
|
|
||||||
foreach( $this->tva as $tvakey => $tvaval )
|
foreach($this->tva as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
if ($tvakey > 0) // On affiche pas taux 0
|
if ($tvakey > 0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
@ -714,7 +714,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||||
//{
|
//{
|
||||||
//Local tax 1
|
//Local tax 1
|
||||||
foreach( $this->localtax1 as $tvakey => $tvaval )
|
foreach($this->localtax1 as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
if ($tvakey != 0) // On affiche pas taux 0
|
if ($tvakey != 0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
@ -742,7 +742,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||||
//{
|
//{
|
||||||
//Local tax 2
|
//Local tax 2
|
||||||
foreach( $this->localtax2 as $tvakey => $tvaval )
|
foreach($this->localtax2 as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
if ($tvakey != 0) // On affiche pas taux 0
|
if ($tvakey != 0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
|
|||||||
@ -830,7 +830,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
$pdf->SetFillColor(248, 248, 248);
|
$pdf->SetFillColor(248, 248, 248);
|
||||||
|
|
||||||
$this->atleastoneratenotnull=0;
|
$this->atleastoneratenotnull=0;
|
||||||
foreach( $this->tva as $tvakey => $tvaval )
|
foreach($this->tva as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
if ($tvakey > 0) // On affiche pas taux 0
|
if ($tvakey > 0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
@ -889,11 +889,11 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||||
//{
|
//{
|
||||||
//Local tax 1
|
//Local tax 1
|
||||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||||
|
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
if ($tvakey != 0) // On affiche pas taux 0
|
if ($tvakey != 0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
@ -921,11 +921,11 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||||
//{
|
//{
|
||||||
//Local tax 2
|
//Local tax 2
|
||||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
foreach($this->localtax2 as $localtax_type => $localtax_rate)
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||||
|
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
if ($tvakey != 0) // On affiche pas taux 0
|
if ($tvakey != 0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
|
|||||||
@ -939,11 +939,11 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||||||
//Local tax 1 before VAT
|
//Local tax 1 before VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||||
//{
|
//{
|
||||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
||||||
|
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
if ($tvakey!=0) // On affiche pas taux 0
|
if ($tvakey!=0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
@ -971,11 +971,11 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||||||
//Local tax 2 before VAT
|
//Local tax 2 before VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||||
//{
|
//{
|
||||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
foreach($this->localtax2 as $localtax_type => $localtax_rate)
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
||||||
|
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
if ($tvakey!=0) // On affiche pas taux 0
|
if ($tvakey!=0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
@ -1030,11 +1030,11 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||||||
//Local tax 1 after VAT
|
//Local tax 1 after VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||||
//{
|
//{
|
||||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||||
|
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
if ($tvakey != 0) // On affiche pas taux 0
|
if ($tvakey != 0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
@ -1062,11 +1062,11 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||||||
//Local tax 2 after VAT
|
//Local tax 2 after VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||||
//{
|
//{
|
||||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
foreach($this->localtax2 as $localtax_type => $localtax_rate)
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||||
|
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
// retrieve global local tax
|
// retrieve global local tax
|
||||||
if ($tvakey != 0) // On affiche pas taux 0
|
if ($tvakey != 0) // On affiche pas taux 0
|
||||||
|
|||||||
@ -97,4 +97,4 @@ class LogHandler
|
|||||||
{
|
{
|
||||||
$this->ident+=$ident;
|
$this->ident+=$ident;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -83,4 +83,4 @@ interface LogHandlerInterface
|
|||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function export($content);
|
public function export($content);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -124,4 +124,4 @@ class mod_syslog_syslog extends LogHandler implements LogHandlerInterface
|
|||||||
syslog($content['level'], $content['message']);
|
syslog($content['level'], $content['message']);
|
||||||
closelog();
|
closelog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -262,7 +262,7 @@ print '<script type="text/javascript" language="javascript">
|
|||||||
dol_include_once('/core/class/extrafields.class.php');
|
dol_include_once('/core/class/extrafields.class.php');
|
||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
$extralabels = $extrafields->fetch_name_optionals_label('societe');
|
$extralabels = $extrafields->fetch_name_optionals_label('societe');
|
||||||
foreach ( $extralabels as $key => $val ) {
|
foreach ($extralabels as $key => $val) {
|
||||||
if ($key != 'ts_nameextra' && $key != 'ts_payeur') {
|
if ($key != 'ts_nameextra' && $key != 'ts_payeur') {
|
||||||
print '<tr><td>' . $extrafields->attribute_label[$key];
|
print '<tr><td>' . $extrafields->attribute_label[$key];
|
||||||
if (! empty($array_query['options_' . $key]) || (is_array($array_query['options_' . $key]) && count($array_query['options_' . $key]) > 0)) {
|
if (! empty($array_query['options_' . $key]) || (is_array($array_query['options_' . $key]) && count($array_query['options_' . $key]) > 0)) {
|
||||||
@ -451,7 +451,7 @@ print '<script type="text/javascript" language="javascript">
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
foreach ( $extralabels as $key => $val ) {
|
foreach ($extralabels as $key => $val) {
|
||||||
|
|
||||||
print '<tr><td>' . $extrafields->attribute_label[$key];
|
print '<tr><td>' . $extrafields->attribute_label[$key];
|
||||||
if ($array_query['options_' . $key . '_cnct'] != '' || (is_array($array_query['options_' . $key . '_cnct']) && count($array_query['options_' . $key . '_cnct']) > 0)) {
|
if ($array_query['options_' . $key . '_cnct'] != '' || (is_array($array_query['options_' . $key . '_cnct']) && count($array_query['options_' . $key . '_cnct']) > 0)) {
|
||||||
@ -527,4 +527,4 @@ print '<script type="text/javascript" language="javascript">
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|||||||
@ -45,4 +45,4 @@ if (! empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,4 +26,4 @@ if (! empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
/* Copyright (C) 2012 Nicolas Villa aka Boyquotes http://informetic.fr
|
/* Copyright (C) 2012 Nicolas Villa aka Boyquotes http://informetic.fr
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2013-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -28,6 +29,7 @@ require '../main.inc.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/cron/class/cronjob.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/cron/class/cronjob.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/cron.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/cron.lib.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("admin","cron","bills","members"));
|
$langs->loadLangs(array("admin","cron","bills","members"));
|
||||||
|
|||||||
@ -518,4 +518,4 @@ class DataPolicyCron
|
|||||||
$contacts->getAllAdherentsNotInformed();
|
$contacts->getAllAdherentsNotInformed();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -172,7 +172,7 @@ if (($action == 'create' || $action == 'add') && ! $error) {
|
|||||||
|
|
||||||
if ($_POST['origin'] && $_POST['originid']) {
|
if ($_POST['origin'] && $_POST['originid']) {
|
||||||
$linked_orders_ids=array();
|
$linked_orders_ids=array();
|
||||||
foreach ( $orders_id as $origin => $origin_id ) {
|
foreach ($orders_id as $origin => $origin_id) {
|
||||||
$origin_id = (! empty($origin_id) ? $origin_id : $orders_id[$ii]);
|
$origin_id = (! empty($origin_id) ? $origin_id : $orders_id[$ii]);
|
||||||
$linked_orders_ids[]=$origin_id;
|
$linked_orders_ids[]=$origin_id;
|
||||||
}
|
}
|
||||||
@ -352,7 +352,7 @@ if ($action == 'create' && !$error) {
|
|||||||
|
|
||||||
$objectsrc = new CommandeFournisseur($db);
|
$objectsrc = new CommandeFournisseur($db);
|
||||||
$listoforders = array ();
|
$listoforders = array ();
|
||||||
foreach ( $selected as $sel ) {
|
foreach ($selected as $sel) {
|
||||||
$result = $objectsrc->fetch($sel);
|
$result = $objectsrc->fetch($sel);
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
$listoforders[] = $objectsrc->ref;
|
$listoforders[] = $objectsrc->ref;
|
||||||
|
|||||||
@ -85,7 +85,7 @@ print '<tr class="liste_titre">';
|
|||||||
print '<td colspan="3">' . $langs->trans('Journaux') . '</td>';
|
print '<td colspan="3">' . $langs->trans('Journaux') . '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
foreach ( $list as $key ) {
|
foreach ($list as $key) {
|
||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
|
|
||||||
print '<tr ' . $bc[$var] . ' class="value">';
|
print '<tr ' . $bc[$var] . ' class="value">';
|
||||||
|
|||||||
@ -169,7 +169,7 @@ class Establishment extends CommonObject
|
|||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
if ($error) {
|
if ($error) {
|
||||||
foreach ( $this->errors as $errmsg ) {
|
foreach ($this->errors as $errmsg) {
|
||||||
dol_syslog(get_class($this) . "::create " . $errmsg, LOG_ERR);
|
dol_syslog(get_class($this) . "::create " . $errmsg, LOG_ERR);
|
||||||
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,4 +53,5 @@ NbOfInvoices=Nb of invoices
|
|||||||
Paymentnumpad=Payment Num Pad
|
Paymentnumpad=Payment Num Pad
|
||||||
Numberspad=Numbers Pad
|
Numberspad=Numbers Pad
|
||||||
BillsCoinsPad=Bills and Coins Pad
|
BillsCoinsPad=Bills and Coins Pad
|
||||||
DolistorePosCategory=TakePOS modules and other POS solutions for Dolibarr
|
DolistorePosCategory=TakePOS modules and other POS solutions for Dolibarr
|
||||||
|
TakeposNeedsCategories=TakePOS needs product categories to work
|
||||||
@ -88,7 +88,7 @@ if (empty($reshook))
|
|||||||
if ($action == 'update') {
|
if ($action == 'update') {
|
||||||
$datapost = $_POST;
|
$datapost = $_POST;
|
||||||
|
|
||||||
foreach ( $datapost as $key => $value ) {
|
foreach ($datapost as $key => $value) {
|
||||||
if (strpos($key, 'buyingprice_') !== false) {
|
if (strpos($key, 'buyingprice_') !== false) {
|
||||||
$tmp_array = explode('_', $key);
|
$tmp_array = explode('_', $key);
|
||||||
if (count($tmp_array) > 0) {
|
if (count($tmp_array) > 0) {
|
||||||
|
|||||||
@ -356,6 +356,7 @@ class Productbatch extends CommonObject
|
|||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
$this->error=$object->error;
|
$this->error=$object->error;
|
||||||
|
$this->errors=array_merge($this->errors, $object->errors);
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -240,7 +240,7 @@ class Productcustomerprice extends CommonObject
|
|||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
if ($error) {
|
if ($error) {
|
||||||
foreach ( $this->errors as $errmsg ) {
|
foreach ($this->errors as $errmsg) {
|
||||||
dol_syslog(get_class($this) . "::create " . $errmsg, LOG_ERR);
|
dol_syslog(get_class($this) . "::create " . $errmsg, LOG_ERR);
|
||||||
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
||||||
}
|
}
|
||||||
@ -374,7 +374,7 @@ class Productcustomerprice extends CommonObject
|
|||||||
|
|
||||||
// Manage filter
|
// Manage filter
|
||||||
if (count($filter) > 0) {
|
if (count($filter) > 0) {
|
||||||
foreach ( $filter as $key => $value ) {
|
foreach ($filter as $key => $value) {
|
||||||
if (strpos($key, 'date')) // To allow $filter['YEAR(s.dated)']=>$year
|
if (strpos($key, 'date')) // To allow $filter['YEAR(s.dated)']=>$year
|
||||||
{
|
{
|
||||||
$sql .= ' AND ' . $key . ' = \'' . $value . '\'';
|
$sql .= ' AND ' . $key . ' = \'' . $value . '\'';
|
||||||
@ -486,7 +486,7 @@ class Productcustomerprice extends CommonObject
|
|||||||
|
|
||||||
// Manage filter
|
// Manage filter
|
||||||
if (count($filter) > 0) {
|
if (count($filter) > 0) {
|
||||||
foreach ( $filter as $key => $value ) {
|
foreach ($filter as $key => $value) {
|
||||||
if (strpos($key, 'date')) // To allow $filter['YEAR(s.dated)']=>$year
|
if (strpos($key, 'date')) // To allow $filter['YEAR(s.dated)']=>$year
|
||||||
{
|
{
|
||||||
$sql .= ' AND ' . $key . ' = \'' . $value . '\'';
|
$sql .= ' AND ' . $key . ' = \'' . $value . '\'';
|
||||||
@ -732,7 +732,7 @@ class Productcustomerprice extends CommonObject
|
|||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
if ($error) {
|
if ($error) {
|
||||||
foreach ( $this->errors as $errmsg ) {
|
foreach ($this->errors as $errmsg) {
|
||||||
dol_syslog(get_class($this) . "::update " . $errmsg, LOG_ERR);
|
dol_syslog(get_class($this) . "::update " . $errmsg, LOG_ERR);
|
||||||
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
||||||
}
|
}
|
||||||
@ -880,7 +880,7 @@ class Productcustomerprice extends CommonObject
|
|||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
if ($error) {
|
if ($error) {
|
||||||
foreach ( $this->errors as $errmsg ) {
|
foreach ($this->errors as $errmsg) {
|
||||||
dol_syslog(get_class($this) . "::delete " . $errmsg, LOG_ERR);
|
dol_syslog(get_class($this) . "::delete " . $errmsg, LOG_ERR);
|
||||||
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
||||||
}
|
}
|
||||||
@ -924,7 +924,8 @@ class Productcustomerprice extends CommonObject
|
|||||||
// Other options
|
// Other options
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
$this->error = $object->error;
|
$this->error = $object->error;
|
||||||
$error ++;
|
$this->errors=array_merge($this->errors, $object->errors);
|
||||||
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error) {
|
if (! $error) {
|
||||||
|
|||||||
@ -589,6 +589,7 @@ class Propalmergepdfproduct extends CommonObject
|
|||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
$this->error=$object->error;
|
$this->error=$object->error;
|
||||||
|
$this->errors=array_merge($this->errors, $object->errors);
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -142,7 +142,7 @@ if ($action=='filemerge')
|
|||||||
|
|
||||||
// for each file checked add it to the product
|
// for each file checked add it to the product
|
||||||
if (is_array($filetomerge_file_array)) {
|
if (is_array($filetomerge_file_array)) {
|
||||||
foreach ( $filetomerge_file_array as $filetomerge_file ) {
|
foreach ($filetomerge_file_array as $filetomerge_file) {
|
||||||
$filetomerge->fk_product = $object->id;
|
$filetomerge->fk_product = $object->id;
|
||||||
$filetomerge->file_name = $filetomerge_file;
|
$filetomerge->file_name = $filetomerge_file;
|
||||||
|
|
||||||
|
|||||||
@ -107,7 +107,7 @@ $cancel != $langs->trans("Cancel") &&
|
|||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$current_lang = $langs->getDefaultLang();
|
$current_lang = $langs->getDefaultLang();
|
||||||
|
|
||||||
foreach ( $object->multilangs as $key => $value ) // enregistrement des nouvelles valeurs dans l'objet
|
foreach ($object->multilangs as $key => $value) // enregistrement des nouvelles valeurs dans l'objet
|
||||||
{
|
{
|
||||||
if ( $key == $current_lang )
|
if ( $key == $current_lang )
|
||||||
{
|
{
|
||||||
|
|||||||
@ -722,18 +722,14 @@ class Project extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($error))
|
if (empty($error)) {
|
||||||
{
|
|
||||||
// We remove directory
|
// We remove directory
|
||||||
$projectref = dol_sanitizeFileName($this->ref);
|
$projectref = dol_sanitizeFileName($this->ref);
|
||||||
if ($conf->projet->dir_output)
|
if ($conf->projet->dir_output) {
|
||||||
{
|
|
||||||
$dir = $conf->projet->dir_output . "/" . $projectref;
|
$dir = $conf->projet->dir_output . "/" . $projectref;
|
||||||
if (file_exists($dir))
|
if (file_exists($dir)) {
|
||||||
{
|
|
||||||
$res = @dol_delete_dir_recursive($dir);
|
$res = @dol_delete_dir_recursive($dir);
|
||||||
if (!$res)
|
if (!$res) {
|
||||||
{
|
|
||||||
$this->errors[] = 'ErrorFailToDeleteDir';
|
$this->errors[] = 'ErrorFailToDeleteDir';
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
@ -758,9 +754,9 @@ class Project extends CommonObject
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
foreach ( $this->errors as $errmsg )
|
foreach ($this->errors as $errmsg)
|
||||||
{
|
{
|
||||||
dol_syslog(get_class($this) . "::delete " . $errmsg, LOG_ERR);
|
dol_syslog(get_class($this) . "::delete " . $errmsg, LOG_ERR);
|
||||||
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
||||||
}
|
}
|
||||||
@ -955,48 +951,37 @@ class Project extends CommonObject
|
|||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
if ($mode == 0)
|
if ($mode == 0) {
|
||||||
{
|
|
||||||
return $langs->trans($this->statuts_long[$statut]);
|
return $langs->trans($this->statuts_long[$statut]);
|
||||||
}
|
} elseif ($mode == 1) {
|
||||||
if ($mode == 1)
|
|
||||||
{
|
|
||||||
return $langs->trans($this->statuts_short[$statut]);
|
return $langs->trans($this->statuts_short[$statut]);
|
||||||
}
|
} elseif ($mode == 2) {
|
||||||
if ($mode == 2)
|
|
||||||
{
|
|
||||||
if ($statut == 0)
|
if ($statut == 0)
|
||||||
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut0') . ' ' . $langs->trans($this->statuts_short[$statut]);
|
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut0') . ' ' . $langs->trans($this->statuts_short[$statut]);
|
||||||
if ($statut == 1)
|
elseif ($statut == 1)
|
||||||
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut4') . ' ' . $langs->trans($this->statuts_short[$statut]);
|
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut4') . ' ' . $langs->trans($this->statuts_short[$statut]);
|
||||||
if ($statut == 2)
|
elseif ($statut == 2)
|
||||||
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut6') . ' ' . $langs->trans($this->statuts_short[$statut]);
|
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut6') . ' ' . $langs->trans($this->statuts_short[$statut]);
|
||||||
}
|
} elseif ($mode == 3) {
|
||||||
if ($mode == 3)
|
|
||||||
{
|
|
||||||
if ($statut == 0)
|
if ($statut == 0)
|
||||||
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut0');
|
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut0');
|
||||||
if ($statut == 1)
|
elseif ($statut == 1)
|
||||||
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut4');
|
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut4');
|
||||||
if ($statut == 2)
|
elseif ($statut == 2)
|
||||||
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut6');
|
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut6');
|
||||||
}
|
} elseif ($mode == 4) {
|
||||||
if ($mode == 4)
|
|
||||||
{
|
|
||||||
if ($statut == 0)
|
if ($statut == 0)
|
||||||
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut0') . ' ' . $langs->trans($this->statuts_long[$statut]);
|
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut0') . ' ' . $langs->trans($this->statuts_long[$statut]);
|
||||||
if ($statut == 1)
|
elseif ($statut == 1)
|
||||||
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut4') . ' ' . $langs->trans($this->statuts_long[$statut]);
|
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut4') . ' ' . $langs->trans($this->statuts_long[$statut]);
|
||||||
if ($statut == 2)
|
if ($statut == 2)
|
||||||
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut6') . ' ' . $langs->trans($this->statuts_long[$statut]);
|
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut6') . ' ' . $langs->trans($this->statuts_long[$statut]);
|
||||||
}
|
} elseif ($mode == 5) {
|
||||||
if ($mode == 5)
|
|
||||||
{
|
|
||||||
if ($statut == 0)
|
if ($statut == 0)
|
||||||
return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_long[$statut]), 'statut0');
|
return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_long[$statut]), 'statut0');
|
||||||
if ($statut == 1)
|
elseif ($statut == 1)
|
||||||
return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_long[$statut]), 'statut4');
|
return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_long[$statut]), 'statut4');
|
||||||
if ($statut == 2)
|
elseif ($statut == 2)
|
||||||
return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_long[$statut]), 'statut6');
|
return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_long[$statut]), 'statut6');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1973,4 +1973,4 @@ class Reception extends CommonObject
|
|||||||
|
|
||||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -115,7 +115,7 @@ $arrayfields = array(
|
|||||||
);
|
);
|
||||||
// Extra fields
|
// Extra fields
|
||||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) {
|
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) {
|
||||||
foreach ( $extrafields->attribute_label as $key => $val ) {
|
foreach ($extrafields->attribute_label as $key => $val) {
|
||||||
$typeofextrafield=$extrafields->attribute_type[$key];
|
$typeofextrafield=$extrafields->attribute_type[$key];
|
||||||
if ($typeofextrafield!='separate') {
|
if ($typeofextrafield!='separate') {
|
||||||
$arrayfields["ef." . $key] = array(
|
$arrayfields["ef." . $key] = array(
|
||||||
|
|||||||
@ -450,7 +450,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
|
|||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
foreach ( $prodcustprice->lines as $line ) {
|
foreach ($prodcustprice->lines as $line) {
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
$staticprod = new Product($db);
|
$staticprod = new Product($db);
|
||||||
|
|||||||
@ -59,4 +59,4 @@ if ($action=="search"){
|
|||||||
$rows[] = $row;
|
$rows[] = $row;
|
||||||
}
|
}
|
||||||
echo json_encode($rows);
|
echo json_encode($rows);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,21 +1,11 @@
|
|||||||
html,body {
|
html,body {
|
||||||
padding:0;
|
box-sizing: border-box;
|
||||||
|
padding:3px;
|
||||||
margin:0;
|
margin:0;
|
||||||
height:100%;
|
height:100%;
|
||||||
width:100%;
|
width:100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.row {
|
|
||||||
width:100%;
|
|
||||||
height:50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.row div {
|
|
||||||
width:33%;
|
|
||||||
height:100%;
|
|
||||||
float:left;
|
|
||||||
}
|
|
||||||
|
|
||||||
button.calcbutton {
|
button.calcbutton {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -69,33 +59,36 @@ button.actionbutton {
|
|||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
overflow: visible; /* removes extra width in IE */
|
overflow: visible; /* removes extra width in IE */
|
||||||
width:32%;
|
width:33%;
|
||||||
height:32%;
|
height:33%;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.wrapper{
|
div.wrapper{
|
||||||
float:left; /* important */
|
float:left; /* important */
|
||||||
position:relative; /* important(so we can absolutely position the description div */
|
position:relative; /* important(so we can absolutely position the description div */
|
||||||
width:21.5%;
|
width:25%;
|
||||||
height:23%;
|
height:25%;
|
||||||
margin:1%;
|
margin:0;
|
||||||
|
padding:1px;
|
||||||
border: 0.1em solid;
|
border: 0.1em solid;
|
||||||
box-shadow: 3px 3px 2px #888;
|
box-shadow: 3px 3px 2px #888;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color:#f0eeee;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.wrapper2{
|
div.wrapper2{
|
||||||
float:left; /* important */
|
float:left; /* important */
|
||||||
position:relative; /* important(so we can absolutely position the description div */
|
position:relative; /* important(so we can absolutely position the description div */
|
||||||
width:10.9%;
|
width:12.5%;
|
||||||
height:23%;
|
height:25%;
|
||||||
margin-top:0.5%;
|
margin:0;
|
||||||
margin-bottom:0.5%;
|
padding:1px;
|
||||||
margin-left:0.5%;
|
|
||||||
margin-right:0.5%;
|
|
||||||
border: 0.1em solid;
|
border: 0.1em solid;
|
||||||
box-shadow: 3px 3px 2px #888;
|
box-shadow: 2px 2px 1px #888;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color:#f0eeee;
|
||||||
}
|
}
|
||||||
|
|
||||||
button:active{
|
button:active{
|
||||||
@ -124,8 +117,8 @@ div.description{
|
|||||||
}
|
}
|
||||||
|
|
||||||
.container{
|
.container{
|
||||||
width: 98%;
|
width: 100%;
|
||||||
height: 98%;
|
height: 100%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@ -145,10 +138,12 @@ div.description{
|
|||||||
|
|
||||||
.div1{
|
.div1{
|
||||||
height:100%;
|
height:100%;
|
||||||
width: 33%;
|
width: 34%;
|
||||||
float: left;
|
float: left;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
overflow: auto;
|
||||||
|
background-color:white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.div2{
|
.div2{
|
||||||
@ -156,7 +151,6 @@ div.description{
|
|||||||
width: 33%;
|
width: 33%;
|
||||||
font-size: 0;
|
font-size: 0;
|
||||||
float: left;
|
float: left;
|
||||||
text-align: center;
|
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
@ -165,7 +159,6 @@ div.description{
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
width: 33%;
|
width: 33%;
|
||||||
float: left;
|
float: left;
|
||||||
text-align: center;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -175,6 +168,7 @@ div.description{
|
|||||||
float: left;
|
float: left;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
font-size: 6px;
|
font-size: 6px;
|
||||||
|
padding:3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.div5{
|
.div5{
|
||||||
@ -183,6 +177,7 @@ div.description{
|
|||||||
float: left;
|
float: left;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
font-size: 6px;
|
font-size: 6px;
|
||||||
|
padding:10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
p.description_content{
|
p.description_content{
|
||||||
|
|||||||
@ -387,12 +387,12 @@ $( document ).ready(function() {
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<body style="overflow: hidden; background-color:#E8E8E8;">
|
<body style="overflow: hidden; background-color:#D1D1D1;">
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row1">
|
<div class="row1">
|
||||||
|
|
||||||
<div id="poslines" class="div1" style="overflow: auto;">
|
<div id="poslines" class="div1">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="div2">
|
<div class="div2">
|
||||||
@ -415,6 +415,13 @@ $( document ).ready(function() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
// TakePOS setup check
|
||||||
|
if (empty($conf->global->CASHDESK_ID_THIRDPARTY) or empty($conf->global->CASHDESK_ID_BANKACCOUNT_CASH) or empty($conf->global->CASHDESK_ID_BANKACCOUNT_CB)) {
|
||||||
|
setEventMessages($langs->trans("ErrorModuleSetupNotComplete"), null, 'errors');
|
||||||
|
}
|
||||||
|
if (count($maincategories)==0) {
|
||||||
|
setEventMessages($langs->trans("TakeposNeedsCategories"), null, 'errors');
|
||||||
|
}
|
||||||
// User menu and external TakePOS modules
|
// User menu and external TakePOS modules
|
||||||
$menus = array();
|
$menus = array();
|
||||||
$r=0;
|
$r=0;
|
||||||
|
|||||||
@ -197,7 +197,9 @@ class Users extends DolibarrApi
|
|||||||
*
|
*
|
||||||
* @param int $id Id of account to update
|
* @param int $id Id of account to update
|
||||||
* @param array $request_data Datas
|
* @param array $request_data Datas
|
||||||
* @return int
|
* @return array
|
||||||
|
*
|
||||||
|
* @throws RestException
|
||||||
*/
|
*/
|
||||||
function put($id, $request_data = null)
|
function put($id, $request_data = null)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -57,4 +57,4 @@ if ($res == -1) {
|
|||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
print json_encode($res);
|
print json_encode($res);
|
||||||
|
|||||||
@ -346,4 +346,4 @@ class ProductAttribute
|
|||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -226,4 +226,4 @@ class ProductAttributeValue
|
|||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -157,4 +157,4 @@ WHERE c2v.fk_prod_combination = ".(int) $fk_combination;
|
|||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user