Fix bankline cat with various payment

This commit is contained in:
Alexandre SPANGARO 2019-05-26 22:33:35 +02:00
parent ea13657617
commit 19b275f2d1
2 changed files with 4 additions and 4 deletions

View File

@ -421,7 +421,7 @@ class PaymentVarious extends CommonObject
$this->label,
$sign * abs($this->amount),
$this->num_payment,
($category_transaction > 0 ? $category_transaction : 0),
($this->category_transaction > 0 ? $this->category_transaction : 0),
$user
);

View File

@ -53,7 +53,7 @@ $paymenttype = GETPOST("paymenttype", "int");
$accountancy_code = GETPOST("accountancy_code", "alpha");
$subledger_account = GETPOST("subledger_account", "alpha");
$projectid = (GETPOST('projectid', 'int') ? GETPOST('projectid', 'int') : GETPOST('fk_project', 'int'));
$cat1 = GETPOST("cat1", 'alpha');
$category_transaction = GETPOST("category_transaction", 'alpha');
// Security check
$socid = GETPOST("socid", "int");
@ -112,7 +112,7 @@ if (empty($reshook))
$object->type_payment=GETPOST("paymenttype", 'int') > 0 ? GETPOST("paymenttype", "int") : 0;
$object->num_payment=GETPOST("num_payment", 'alpha');
$object->fk_user_author=$user->id;
$object->category_transaction=GETPOST("cat1", 'alpha');
$object->category_transaction=GETPOST("category_transaction", 'alpha');
$object->accountancy_code=GETPOST("accountancy_code") > 0 ? GETPOST("accountancy_code", "alpha") : "";
$object->subledger_account=GETPOST("subledger_account") > 0 ? GETPOST("subledger_account", "alpha") : "";
@ -328,7 +328,7 @@ if ($action == 'create')
if (is_array($options) && count($options))
{
print '<tr><td>'.$langs->trans("Rubrique").'</td><td>';
print Form::selectarray('cat1', $options, GETPOST('cat1'), 1);
print Form::selectarray('category_transaction', $options, GETPOST('category_transaction'), 1);
print '</td></tr>';
}