FIX #4245 PHP 7
This commit is contained in:
parent
1c1d176715
commit
f0802eb36b
@ -55,6 +55,8 @@ class FormOrder
|
|||||||
*/
|
*/
|
||||||
function selectSupplierOrderStatus($selected='', $short=0, $hmlname='order_status')
|
function selectSupplierOrderStatus($selected='', $short=0, $hmlname='order_status')
|
||||||
{
|
{
|
||||||
|
$tmpsupplierorder=new CommandeFournisseur($db);
|
||||||
|
|
||||||
print '<select class="flat" name="'.$hmlname.'">';
|
print '<select class="flat" name="'.$hmlname.'">';
|
||||||
print '<option value="-1"> </option>';
|
print '<option value="-1"> </option>';
|
||||||
$statustohow=array('0'=>'0','1'=>'1','2'=>'2','3'=>'3','4'=>'4','5'=>'5','6'=>'6,7','9'=>'9'); // 7 is same label than 6. 8 does not exists (billed is another field)
|
$statustohow=array('0'=>'0','1'=>'1','2'=>'2','3'=>'3','4'=>'4','5'=>'5','6'=>'6,7','9'=>'9'); // 7 is same label than 6. 8 does not exists (billed is another field)
|
||||||
@ -62,7 +64,8 @@ class FormOrder
|
|||||||
foreach($statustohow as $key => $value)
|
foreach($statustohow as $key => $value)
|
||||||
{
|
{
|
||||||
print '<option value="'.$value.'"'.(($selected == $key || $selected == $value)?' selected':'').'>';
|
print '<option value="'.$value.'"'.(($selected == $key || $selected == $value)?' selected':'').'>';
|
||||||
print CommandeFournisseur::LibStatut($key,$short);
|
$tmpsupplierorder->statut=$key;
|
||||||
|
print $tmpsupplierorder->getLibStatut($short);
|
||||||
print '</option>';
|
print '</option>';
|
||||||
}
|
}
|
||||||
print '</select>';
|
print '</select>';
|
||||||
|
|||||||
@ -498,7 +498,7 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
*/
|
*/
|
||||||
function getLibStatut($mode=0)
|
function getLibStatut($mode=0)
|
||||||
{
|
{
|
||||||
return $this->LibStatut($this->statut,$mode);
|
return $this->LibStatut($this->statut,$mode,$this->billed);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -506,16 +506,17 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
*
|
*
|
||||||
* @param int $statut Id statut
|
* @param int $statut Id statut
|
||||||
* @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto
|
* @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto
|
||||||
|
* @param int $billed 1=Billed
|
||||||
* @return string Label of status
|
* @return string Label of status
|
||||||
*/
|
*/
|
||||||
function LibStatut($statut,$mode=0)
|
function LibStatut($statut,$mode=0,$billed=0)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
$langs->load('orders');
|
$langs->load('orders');
|
||||||
|
|
||||||
$billedtext='';
|
$billedtext='';
|
||||||
//if ($statut==5 && $this->billed == 1) $statut = 8;
|
//if ($statut==5 && $this->billed == 1) $statut = 8;
|
||||||
if ($this->billed == 1) $billedtext=$langs->trans("Billed");
|
if ($billed == 1) $billedtext=$langs->trans("Billed");
|
||||||
|
|
||||||
// List of language codes for status
|
// List of language codes for status
|
||||||
$statutshort[0] = 'StatusOrderDraftShort';
|
$statutshort[0] = 'StatusOrderDraftShort';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user