diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php
index 98199285dfc..804a5804245 100644
--- a/htdocs/commande/fiche.php
+++ b/htdocs/commande/fiche.php
@@ -51,12 +51,12 @@ $langs->load('propal');
$langs->load('deliveries');
$langs->load('products');
-$id=(GETPOST("id")?GETPOST("id"):GETPOST("orderid"));
-$ref=GETPOST('ref');
-$socid=GETPOST('socid');
-$action=GETPOST('action');
-$confirm=GETPOST('confirm');
-$lineid=GETPOST('lineid');
+$id =(GETPOST("id")?GETPOST("id"):GETPOST("orderid"));
+$ref = GETPOST('ref');
+$socid = GETPOST('socid');
+$action = GETPOST('action');
+$confirm = GETPOST('confirm');
+$lineid = GETPOST('lineid');
// Security check
if ($user->societe_id) $socid=$user->societe_id;
@@ -105,7 +105,7 @@ if ($action == 'confirm_clone' && $confirm == 'yes')
else
{
$mesg=$object->error;
- $_GET['action']='';
+ $action='';
}
}
}
@@ -376,8 +376,8 @@ if ($action == 'add' && $user->rights->commande->creer)
else
{
$db->rollback();
- $_GET["action"]='create';
- $_GET['socid']=$_POST['socid'];
+ $action='create';
+ $socid=$_POST['socid'];
if (! $mesg) $mesg='
'.$object->error.'
';
}
@@ -932,7 +932,7 @@ if ($_POST['addfile'])
$mesg=dol_add_file_process($upload_dir,0,0);
- $_GET["action"]='presend';
+ $action ='presend';
$_POST["action"]='presend';
}
@@ -949,7 +949,7 @@ if (! empty($_POST['removedfile']))
$mesg=dol_remove_file_process($_POST['removedfile'],0);
- $_GET["action"]='presend';
+ $action ='presend';
$_POST["action"]='presend';
}
@@ -1088,7 +1088,7 @@ if ($action == 'send' && ! $_POST['addfile'] && ! $_POST['removedfile'] && ! $_P
{
$langs->load("other");
$mesg=''.$langs->trans('ErrorMailRecipientIsEmpty').' !
';
- $_GET["action"]='presend';
+ $action='presend';
dol_syslog('Recipient email is empty');
}
}
@@ -1206,25 +1206,25 @@ if ($action == 'create' && $user->rights->commande->creer)
print '';
// Reference
- print '| '.$langs->trans('Ref').' | '.$langs->trans("Draft").' |
';
+ print '| '.$langs->trans('Ref').' | '.$langs->trans("Draft").' |
';
// Reference client
- print '| '.$langs->trans('RefCustomer').' | ';
+ print ' |
| '.$langs->trans('RefCustomer').' | ';
print ' | ';
print '
';
// Client
- print '| '.$langs->trans('Customer').' | '.$soc->getNomUrl(1).' |
';
+ print '| '.$langs->trans('Customer').' | '.$soc->getNomUrl(1).' |
';
/*
* Contact de la commande
*/
- print "| ".$langs->trans("DefaultContact").' | ';
+ print " |
| ".$langs->trans("DefaultContact").' | ';
$html->select_contacts($soc->id,$setcontact,'contactidp',1,$srccontactslist);
print ' |
';
// Ligne info remises tiers
- print '| '.$langs->trans('Discounts').' | ';
+ print ' |
| '.$langs->trans('Discounts').' | ';
if ($soc->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_client);
else print $langs->trans("CompanyHasNoRelativeDiscount");
print '. ';
@@ -1235,12 +1235,12 @@ if ($action == 'create' && $user->rights->commande->creer)
print ' |
';
// Date
- print '| '.$langs->trans('Date').' | ';
+ print ' |
| '.$langs->trans('Date').' | ';
$html->select_date('','re','','','',"crea_commande",1,1);
print ' |
';
// Date de livraison
- print "| ".$langs->trans("DeliveryDate")." | ";
+ print " |
| ".$langs->trans("DeliveryDate").' | ';
if ($conf->global->DATE_LIVRAISON_WEEK_DELAY)
{
$datedelivery = time() + ((7*$conf->global->DATE_LIVRAISON_WEEK_DELAY) * 24 * 60 * 60);
@@ -1256,29 +1256,29 @@ if ($action == 'create' && $user->rights->commande->creer)
if ($conf->global->COMMANDE_ADD_DELIVERY_ADDRESS)
{
// Link to edit: $html->form_address($_SERVER['PHP_SELF'].'?action=create','',$soc->id,'adresse_livraison_id','commande','');
- print ' |
| '.$langs->trans('DeliveryAddress').' | ';
- $numaddress = $html->select_address($soc->fk_delivery_address, $_GET['socid'],'fk_address',1);
+ print ' |
| '.$langs->trans('DeliveryAddress').' | ';
+ $numaddress = $html->select_address($soc->fk_delivery_address, $socid,'fk_address',1);
print ' '.$langs->trans("AddAddress").'';
print ' |
';
}
// Conditions de reglement
- print '| '.$langs->trans('PaymentConditionsShort').' | ';
+ print ' |
| '.$langs->trans('PaymentConditionsShort').' | ';
$html->select_conditions_paiements($soc->cond_reglement,'cond_reglement_id',-1,1);
print ' |
';
// Mode de reglement
- print '| '.$langs->trans('PaymentMode').' | ';
+ print ' |
| '.$langs->trans('PaymentMode').' | ';
$html->select_types_paiements($soc->mode_reglement,'mode_reglement_id');
print ' |
';
// delai de livraison
- print '| '.$langs->trans('AvailabilityPeriod').' | ';
+ print ' |
| '.$langs->trans('AvailabilityPeriod').' | ';
$html->select_availability($propal->availability,'availability_id');
print ' |
';
// What trigger creation
- print '| '.$langs->trans('Source').' | ';
+ print ' |
| '.$langs->trans('Source').' | ';
$html->select_demand_reason((GETPOST("origin")=='propal'?'SRC_COMM':''),'demand_reason_id','',1);
print ' |
';
@@ -1558,10 +1558,10 @@ else
print '';
print '';
- if ($user->rights->commande->creer && $_GET['action'] == 'refcustomer')
+ if ($user->rights->commande->creer && $action == 'refcustomer')
{
print ' | ';
- if ($_GET['action'] != 'editdate' && $object->brouillon) print 'id.'">'.img_edit($langs->trans('SetDate'),1).' | ';
+ if ($action != 'editdate' && $object->brouillon) print 'id.'">'.img_edit($langs->trans('SetDate'),1).' | ';
print '
';
print '';
- if ($_GET['action'] == 'editdate')
+ if ($action == 'editdate')
{
print ' | ';
- if ($_GET['action'] != 'editdate_livraison') print 'id.'">'.img_edit($langs->trans('SetDeliveryDate'),1).' | ';
+ if ($action != 'editdate_livraison') print 'id.'">'.img_edit($langs->trans('SetDeliveryDate'),1).' | ';
print '';
print '';
- if ($_GET['action'] == 'editdate_livraison')
+ if ($action == 'editdate_livraison')
{
print ' | ';
- if ($_GET['action'] != 'editdelivery_adress' && $object->brouillon) print 'socid.'&id='.$object->id.'">'.img_edit($langs->trans('SetDeliveryAddress'),1).' | ';
+ if ($action != 'editdelivery_adress' && $object->brouillon) print 'socid.'&id='.$object->id.'">'.img_edit($langs->trans('SetDeliveryAddress'),1).' | ';
print '';
print '';
- if ($_GET['action'] == 'editdelivery_adress')
+ if ($action == 'editdelivery_adress')
{
- $html->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$_GET['socid'],'fk_address','commande',$object->id);
+ $html->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$socid,'fk_address','commande',$object->id);
}
else
{
- $html->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$_GET['socid'],'none','commande',$object->id);
+ $html->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$socid,'none','commande',$object->id);
}
print ' | ';
}
@@ -1705,10 +1705,10 @@ else
print $langs->trans('PaymentConditionsShort');
print '';
- if ($_GET['action'] != 'editconditions' && $object->brouillon) print 'id.'">'.img_edit($langs->trans('SetConditions'),1).' | ';
+ if ($action != 'editconditions' && $object->brouillon) print 'id.'">'.img_edit($langs->trans('SetConditions'),1).' | ';
print '';
print '';
- if ($_GET['action'] == 'editconditions')
+ if ($action == 'editconditions')
{
$html->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->cond_reglement_id,'cond_reglement_id');
}
@@ -1725,10 +1725,10 @@ else
print '';
print ' | ';
- if ($_GET['action'] == 'editmode')
+ if ($action == 'editmode')
{
$html->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->mode_reglement_id,'mode_reglement_id');
}
@@ -1743,10 +1743,10 @@ else
print '';
print ' | ';
- if ($_GET['action'] == 'editavailability')
+ if ($action == 'editavailability')
{
$html->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id,$object->availability_id,'availability_id');
}
@@ -1761,10 +1761,10 @@ else
print '';
print ' | ';
- if ($_GET['action'] == 'editdemandreason')
+ if ($action == 'editdemandreason')
{
$html->form_demand_reason($_SERVER['PHP_SELF'].'?id='.$object->id,$object->demand_reason_id,'demand_reason_id',1);
}
@@ -1782,11 +1782,11 @@ else
print '';
print ' | ';
//print "$object->id, $object->socid, $object->fk_project";
- if ($_GET['action'] == 'classer')
+ if ($action == 'classer')
{
$html->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'projectid');
}
@@ -1859,7 +1859,7 @@ else
*/
if ($object->statut == 0 && $user->rights->commande->creer)
{
- if ($_GET['action'] != 'editline')
+ if ($action != 'editline')
{
$var=true;
|