Merge pull request #10077 from aspangaro/9.0p1

Fix create accounting account from balance
This commit is contained in:
Laurent Destailleur 2018-11-29 11:16:27 +01:00 committed by GitHub
commit b15403207b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -1,7 +1,7 @@
<?php <?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> /* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com> * Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
* *
* 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
@ -41,6 +41,7 @@ $id = GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha'); $ref = GETPOST('ref', 'alpha');
$rowid = GETPOST('rowid', 'int'); $rowid = GETPOST('rowid', 'int');
$cancel = GETPOST('cancel','alpha'); $cancel = GETPOST('cancel','alpha');
$accountingaccount = GETPOST('accountingaccount','alpha');
// Security check // Security check
@ -229,7 +230,7 @@ if ($action == 'create') {
// Account number // Account number
print '<tr><td class="titlefieldcreate"><span class="fieldrequired">' . $langs->trans("AccountNumber") . '</span></td>'; print '<tr><td class="titlefieldcreate"><span class="fieldrequired">' . $langs->trans("AccountNumber") . '</span></td>';
print '<td><input name="account_number" size="30" value="' . $object->account_number . '"></td></tr>'; print '<td><input name="account_number" size="30" value="' . $accountingaccount . '"></td></tr>';
// Label // Label
print '<tr><td><span class="fieldrequired">' . $langs->trans("Label") . '</span></td>'; print '<tr><td><span class="fieldrequired">' . $langs->trans("Label") . '</span></td>';

View File

@ -266,7 +266,7 @@ if ($action != 'export_csv')
$description = $object->get_compte_desc($line->numero_compte); // Search description of the account $description = $object->get_compte_desc($line->numero_compte); // Search description of the account
$root_account_description = $object->get_compte_racine($line->numero_compte); $root_account_description = $object->get_compte_racine($line->numero_compte);
if (empty($description)) { if (empty($description)) {
$link = '<a href="../admin/card.php?action=create&compte=' . length_accountg($line->numero_compte) . '">' . img_edit_add() . '</a>'; $link = '<a href="../admin/card.php?action=create&accountingaccount=' . length_accountg($line->numero_compte) . '">' . img_edit_add() . '</a>';
} }
print '<tr class="oddeven">'; print '<tr class="oddeven">';