Debug v18
This commit is contained in:
parent
091d7990ad
commit
9b4b7983fa
2 changed files with 8 additions and 1 deletions
|
|
@ -627,6 +627,7 @@ if ($action == 'create') {
|
|||
if (isModEnabled('accounting')) {
|
||||
print '<tr><td class="'.$fieldrequired.'titlefieldcreate">'.$langs->trans("AccountancyCode").'</td>';
|
||||
print '<td>';
|
||||
print img_picto('', 'accounting_account', 'class="pictofixedwidth"');
|
||||
print $formaccounting->select_account($object->account_number, 'account_number', 1, '', 1, 1);
|
||||
if ($formaccounting->nbaccounts == 0) {
|
||||
$langs->load("errors");
|
||||
|
|
@ -1081,7 +1082,13 @@ if ($action == 'create') {
|
|||
print '<tr><td'.$tdextra.'>'.$langs->trans("AccountancyCode").'</td>';
|
||||
print '<td>';
|
||||
if (isModEnabled('accounting')) {
|
||||
print img_picto('', 'accounting_account', 'class="pictofixedwidth"');
|
||||
print $formaccounting->select_account($object->account_number, 'account_number', 1, '', 1, 1);
|
||||
if ($formaccounting->nbaccounts == 0) {
|
||||
$langs->load("errors");
|
||||
$htmltext = $langs->transnoentitiesnoconv("WarningGoOnAccountancySetupToAddAccounts", $langs->transnoentitiesnoconv("MenuAccountancy"), $langs->transnoentitiesnoconv("Setup"), $langs->transnoentitiesnoconv("Chartofaccounts"));
|
||||
print $form->textwithpicto('', $htmltext);
|
||||
}
|
||||
} else {
|
||||
print '<input type="text" name="account_number" value="'.(GETPOST("account_number") ? GETPOST("account_number") : $object->account_number).'">';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -376,7 +376,7 @@ class FormAccounting extends Form
|
|||
$sql = "SELECT DISTINCT aa.account_number, aa.label, aa.labelshort, aa.rowid, aa.fk_pcg_version";
|
||||
$sql .= " FROM ".$this->db->prefix()."accounting_account as aa";
|
||||
$sql .= " INNER JOIN ".$this->db->prefix()."accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
||||
$sql .= " AND asy.rowid = 11111".((int) getDolGlobalInt('CHARTOFACCOUNTS'));
|
||||
$sql .= " AND asy.rowid = ".((int) getDolGlobalInt('CHARTOFACCOUNTS'));
|
||||
if ($active === '1') {
|
||||
$sql .= " AND aa.active = 1";
|
||||
} elseif ($active === '0') {
|
||||
|
|
|
|||
Loading…
Reference in a new issue