Fix bug on invoice extrafield type date
This commit is contained in:
parent
30ad2f1609
commit
b9f7d4c302
@ -655,15 +655,11 @@ else if ($action == 'add' && $user->rights->facture->creer)
|
|||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
$error=0;
|
$error=0;
|
||||||
|
|
||||||
// Get extra fields
|
// Fill array 'array_options' with data from add form
|
||||||
foreach($_POST as $key => $value)
|
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
{
|
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||||
if (preg_match("/^options_/",$key))
|
|
||||||
{
|
|
||||||
$object->array_options[$key]=GETPOST($key);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Replacement invoice
|
// Replacement invoice
|
||||||
if ($_POST['type'] == 1)
|
if ($_POST['type'] == 1)
|
||||||
|
|||||||
@ -75,6 +75,8 @@ if (empty($conf->global->MEMBER_ENABLE_PUBLIC))
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$extrafields = new ExtraFields($db);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show header for new member
|
* Show header for new member
|
||||||
@ -245,11 +247,10 @@ if ($action == 'add')
|
|||||||
$adh->morphy = $_POST["morphy"];
|
$adh->morphy = $_POST["morphy"];
|
||||||
$adh->birth = $birthday;
|
$adh->birth = $birthday;
|
||||||
|
|
||||||
foreach($_POST as $key => $value){
|
|
||||||
if (preg_match("/^options_/",$key)){
|
// Fill array 'array_options' with data from add form
|
||||||
$adh->array_options[$key]=$_POST[$key];
|
$extralabels=$extrafields->fetch_name_optionals_label($adh->table_element);
|
||||||
}
|
$ret = $extrafields->setOptionalsFromPost($extralabels,$adh);
|
||||||
}
|
|
||||||
|
|
||||||
$result=$adh->create($user->id);
|
$result=$adh->create($user->id);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
@ -360,7 +361,6 @@ if ($action == 'added')
|
|||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$formcompany = new FormCompany($db);
|
$formcompany = new FormCompany($db);
|
||||||
$adht = new AdherentType($db);
|
$adht = new AdherentType($db);
|
||||||
$extrafields = new ExtraFields($db);
|
|
||||||
$extrafields->fetch_name_optionals_label('adherent'); // fetch optionals attributes and labels
|
$extrafields->fetch_name_optionals_label('adherent'); // fetch optionals attributes and labels
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user