2
0
forked from Wavyzz/dolibarr

Merge remote-tracking branch 'origin/3.7' into develop

Conflicts:
	htdocs/compta/prelevement/class/bonprelevement.class.php
	htdocs/index.php
	htdocs/projet/class/project.class.php
	test/phpunit/BankAccountTest.php
This commit is contained in:
Laurent Destailleur
2015-02-23 14:59:24 +01:00
66 changed files with 730 additions and 471 deletions

View File

@@ -69,6 +69,8 @@ $hidedetails = (GETPOST('hidedetails','int') ? GETPOST('hidedetails','int') : (!
$hidedesc = (GETPOST('hidedesc','int') ? GETPOST('hidedesc','int') : (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0));
$hideref = (GETPOST('hideref','int') ? GETPOST('hideref','int') : (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0));
$datelivraison=dol_mktime(GETPOST('liv_hour','int'), GETPOST('liv_min','int'), GETPOST('liv_sec','int'), GETPOST('liv_month','int'), GETPOST('liv_day','int'),GETPOST('liv_year','int'));
// Security check
if ($user->societe_id) $socid=$user->societe_id;
@@ -144,8 +146,6 @@ if ($action == 'setbankaccount' && $user->rights->fournisseur->commande->creer)
// date de livraison
if ($action == 'setdate_livraison' && $user->rights->fournisseur->commande->creer)
{
$datelivraison=dol_mktime(GETPOST('liv_hour','int'), GETPOST('liv_min','int'), GETPOST('liv_sec','int'), GETPOST('liv_month','int'), GETPOST('liv_day','int'),GETPOST('liv_year','int'));
$result=$object->set_date_livraison($user,$datelivraison);
if ($result < 0)
{
@@ -783,9 +783,8 @@ if ($action == 'update_extras')
{
// Fill array 'array_options' with data from add form
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
if($ret < 0) $error++;
$ret = $extrafields->setOptionalsFromPost($extralabels,$object,GETPOST('attribute'));
if ($ret < 0) $error++;
if (!$error)
{
@@ -800,7 +799,6 @@ if ($action == 'update_extras')
{
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
{
$result=$object->insertExtraFields();
if ($result < 0)
@@ -844,6 +842,7 @@ if ($action == 'add' && $user->rights->fournisseur->commande->creer)
$object->fk_account = GETPOST('fk_account', 'int');
$object->note_private = GETPOST('note_private');
$object->note_public = GETPOST('note_public');
$object->date_livraison = $datelivraison;
// Fill array 'array_options' with data from add form
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
@@ -1275,6 +1274,16 @@ if ($action=="create")
$form->select_types_paiements(isset($_POST['mode_reglement_id'])?$_POST['mode_reglement_id']:$mode_reglement_id,'mode_reglement_id');
print '</td></tr>';
// Planned delivery date
print '<tr><td>';
print $langs->trans('DateDeliveryPlanned');
print '</td>';
print '<td>';
$usehourmin=0;
if (! empty($conf->global->SUPPLIER_ORDER_USE_HOUR_FOR_DELIVERY_DATE)) $usehourmin=1;
$form->select_date($datelivraison?$datelivraison:-1,'liv_',$usehourmin,$usehourmin,'',"set");
print '</td></tr>';
// Bank Account
if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER) && ! empty($conf->banque->enabled))
{