QUAL rename facnumber by ref

This commit is contained in:
Maxime Kohlhaas
2018-12-02 14:31:45 +01:00
parent aa2ecd4b73
commit 2e496ea83a
77 changed files with 284 additions and 253 deletions

View File

@@ -136,7 +136,7 @@ if (($action == 'create' || $action == 'add') && !$error)
$closeOrders = GETPOST('autocloseorders') ? true : false;
// Security check
$fieldid = GETPOST('ref','alpha')?'facnumber':'rowid';
$fieldid = GETPOST('ref','alpha')?'ref':'rowid';
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'facture', $id,'','','fk_soc',$fieldid);
@@ -163,7 +163,7 @@ if (($action == 'create' || $action == 'add') && !$error)
// Si facture standard
$object->socid = $_POST['socid'];
$object->type = $_POST['type'];
$object->number = $_POST['facnumber'];
$object->number = $_POST['ref'];
$object->date = $datefacture;
$object->note_public = trim($_POST['note_public']);
$object->note = trim($_POST['note']);
@@ -405,7 +405,7 @@ if ($action == 'create' && !$error)
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="add">';
print '<input type="hidden" name="socid" value="'.$soc->id.'">' ."\n";
print '<input name="facnumber" type="hidden" value="provisoire">';
print '<input name="ref" type="hidden" value="provisoire">';
print '<input name="ref_client" type="hidden" value="'.$ref_client.'">';
print '<input name="ref_int" type="hidden" value="'.$ref_int.'">';
print '<input type="hidden" name="origin" value="'.GETPOST('origin').'">';