Skip to content
Snippets Groups Projects
Commit f9757bf0 authored by Juanjo Menent's avatar Juanjo Menent
Browse files

Merge pull request #3176 from aspangaro/develop-patch55

Fix #3166 : An accounting account can be alphanumeric (Need for EBP)
parents 407f27dc dbb5d3d3
No related branches found
No related tags found
No related merge requests found
......@@ -39,6 +39,7 @@ $mesg = '';
$action = GETPOST('action');
$id = GETPOST('id', 'int');
$rowid = GETPOST('rowid', 'int');
$cancel = GETPOST('cancel');
// Security check
if (!$user->admin)
......@@ -49,7 +50,7 @@ $accounting = new AccountingAccount($db);
// Action
if ($action == 'add')
{
if (! GETPOST('cancel', 'alpha')) {
if (! $cancel) {
$sql = 'SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $conf->global->CHARTOFACCOUNTS;
dol_syslog('accountancy/admin/card.php:: $sql=' . $sql);
......@@ -59,7 +60,7 @@ if ($action == 'add')
$accounting->fk_pcg_version = $obj->pcg_version;
$accounting->pcg_type = GETPOST('pcg_type');
$accounting->pcg_subtype = GETPOST('pcg_subtype');
$accounting->account_number = GETPOST('account_number', 'int');
$accounting->account_number = GETPOST('account_number');
$accounting->account_parent = GETPOST('account_parent', 'int');
$accounting->label = GETPOST('label', 'alpha');
$accounting->active = 1;
......@@ -94,7 +95,7 @@ else if ($action == 'edit')
$accounting->fk_pcg_version = $obj->pcg_version;
$accounting->pcg_type = GETPOST('pcg_type');
$accounting->pcg_subtype = GETPOST('pcg_subtype');
$accounting->account_number = GETPOST('account_number', 'int');
$accounting->account_number = GETPOST('account_number');
$accounting->account_parent = GETPOST('account_parent', 'int');
$accounting->label = GETPOST('label', 'alpha');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment