Use ->statut instead of status
This commit is contained in:
parent
54556b37fd
commit
24bf23e68b
1 changed files with 14 additions and 14 deletions
|
|
@ -1803,7 +1803,7 @@ if ($action == 'create') {
|
|||
// Confirm deletion
|
||||
if ($action == 'delete') {
|
||||
$formquestion = array();
|
||||
if ($object->statut == Expedition::STATUS_CLOSED && getDolGlobalString('STOCK_CALCULATE_ON_SHIPMENT_CLOSE')) {
|
||||
if ($object->status == Expedition::STATUS_CLOSED && getDolGlobalString('STOCK_CALCULATE_ON_SHIPMENT_CLOSE')) {
|
||||
$formquestion = array(
|
||||
array(
|
||||
'label' => $langs->trans('ShipmentIncrementStockOnDelete'),
|
||||
|
|
@ -2184,7 +2184,7 @@ if ($action == 'create') {
|
|||
$editColspan--;
|
||||
}
|
||||
print '<td class="center linecoleditlineotherinfo" colspan="'.$editColspan.'">';
|
||||
if ($object->statut <= 1) {
|
||||
if ($object->status <= 1) {
|
||||
print $langs->trans("QtyToShip").' - ';
|
||||
} else {
|
||||
print $langs->trans("QtyShipped").' - ';
|
||||
|
|
@ -2197,7 +2197,7 @@ if ($action == 'create') {
|
|||
}
|
||||
print '</td>';
|
||||
} else {
|
||||
if ($object->statut <= 1) {
|
||||
if ($object->status <= 1) {
|
||||
print '<td class="center linecolqtytoship">'.$langs->trans("QtyToShip").'</td>';
|
||||
} else {
|
||||
print '<td class="center linecolqtyshipped">'.$langs->trans("QtyShipped").'</td>';
|
||||
|
|
@ -2213,7 +2213,7 @@ if ($action == 'create') {
|
|||
print '<td class="center linecolweight">'.$langs->trans("CalculatedWeight").'</td>';
|
||||
print '<td class="center linecolvolume">'.$langs->trans("CalculatedVolume").'</td>';
|
||||
//print '<td class="center">'.$langs->trans("Size").'</td>';
|
||||
if ($object->statut == 0) {
|
||||
if ($object->status == 0) {
|
||||
print '<td class="linecoledit"></td>';
|
||||
print '<td class="linecoldelete" width="10"></td>';
|
||||
}
|
||||
|
|
@ -2574,7 +2574,7 @@ if ($action == 'create') {
|
|||
print '<input type="submit" class="button button-save" id="savelinebutton marginbottomonly" name="save" value="'.$langs->trans("Save").'"><br>';
|
||||
print '<input type="submit" class="button button-cancel" id="cancellinebutton" name="cancel" value="'.$langs->trans("Cancel").'"><br>';
|
||||
print '</td>';
|
||||
} elseif ($object->statut == Expedition::STATUS_DRAFT) {
|
||||
} elseif ($object->status == Expedition::STATUS_DRAFT) {
|
||||
// edit-delete buttons
|
||||
print '<td class="linecoledit center">';
|
||||
print '<a class="editfielda reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=editline&token='.newToken().'&lineid='.$lines[$i]->id.'">'.img_edit().'</a>';
|
||||
|
|
@ -2647,7 +2647,7 @@ if ($action == 'create') {
|
|||
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been
|
||||
// modified by hook
|
||||
if (empty($reshook)) {
|
||||
if ($object->statut == Expedition::STATUS_DRAFT && $num_prod > 0) {
|
||||
if ($object->status == Expedition::STATUS_DRAFT && $num_prod > 0) {
|
||||
if ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('expedition', 'creer'))
|
||||
|| (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('expedition', 'shipping_advance', 'validate'))) {
|
||||
print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"].'?action=valid&token='.newToken().'&id='.$object->id, '');
|
||||
|
|
@ -2657,12 +2657,12 @@ if ($action == 'create') {
|
|||
}
|
||||
|
||||
// 0=draft, 1=validated/delivered, 2=closed/delivered
|
||||
if ($object->statut == Expedition::STATUS_VALIDATED && !getDolGlobalString('STOCK_CALCULATE_ON_SHIPMENT')) {
|
||||
if ($object->status == Expedition::STATUS_VALIDATED && !getDolGlobalString('STOCK_CALCULATE_ON_SHIPMENT')) {
|
||||
if ($user->hasRight('expedition', 'creer')) {
|
||||
print dolGetButtonAction('', $langs->trans('SetToDraft'), 'default', $_SERVER["PHP_SELF"].'?action=setdraft&token='.newToken().'&id='.$object->id, '');
|
||||
}
|
||||
}
|
||||
if ($object->statut == Expedition::STATUS_CLOSED) {
|
||||
if ($object->status == Expedition::STATUS_CLOSED) {
|
||||
if ($user->hasRight('expedition', 'creer')) {
|
||||
print dolGetButtonAction('', $langs->trans('ReOpen'), 'default', $_SERVER["PHP_SELF"].'?action=reopen&token='.newToken().'&id='.$object->id, '');
|
||||
}
|
||||
|
|
@ -2670,7 +2670,7 @@ if ($action == 'create') {
|
|||
|
||||
// Send
|
||||
if (empty($user->socid)) {
|
||||
if ($object->statut > 0) {
|
||||
if ($object->status > 0) {
|
||||
if (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || $user->hasRight('expedition', 'shipping_advance', 'send')) {
|
||||
print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?action=presend&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', '');
|
||||
} else {
|
||||
|
|
@ -2680,7 +2680,7 @@ if ($action == 'create') {
|
|||
}
|
||||
|
||||
// Create bill
|
||||
if (isModEnabled('invoice') && ($object->statut == Expedition::STATUS_VALIDATED || $object->statut == Expedition::STATUS_CLOSED)) {
|
||||
if (isModEnabled('invoice') && ($object->status == Expedition::STATUS_VALIDATED || $object->status == Expedition::STATUS_CLOSED)) {
|
||||
if ($user->hasRight('facture', 'creer')) {
|
||||
if (getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT') !== '0') {
|
||||
print dolGetButtonAction('', $langs->trans('CreateBill'), 'default', DOL_URL_ROOT.'/compta/facture/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid, '');
|
||||
|
|
@ -2690,13 +2690,13 @@ if ($action == 'create') {
|
|||
|
||||
// This is just to generate a delivery receipt
|
||||
//var_dump($object->linkedObjectsIds['delivery']);
|
||||
if (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY') && ($object->statut == Expedition::STATUS_VALIDATED || $object->statut == Expedition::STATUS_CLOSED) && $user->hasRight('expedition', 'delivery', 'creer') && empty($object->linkedObjectsIds['delivery'])) {
|
||||
if (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY') && ($object->status == Expedition::STATUS_VALIDATED || $object->status == Expedition::STATUS_CLOSED) && $user->hasRight('expedition', 'delivery', 'creer') && empty($object->linkedObjectsIds['delivery'])) {
|
||||
print dolGetButtonAction('', $langs->trans('CreateDeliveryOrder'), 'default', $_SERVER["PHP_SELF"].'?action=create_delivery&token='.newToken().'&id='.$object->id, '');
|
||||
}
|
||||
|
||||
// Set Billed and Closed
|
||||
if ($object->statut == Expedition::STATUS_VALIDATED) {
|
||||
if ($user->hasRight('expedition', 'creer') && $object->statut > 0) {
|
||||
if ($object->status == Expedition::STATUS_VALIDATED) {
|
||||
if ($user->hasRight('expedition', 'creer') && $object->status > 0) {
|
||||
if (!$object->billed && getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT') !== '0') {
|
||||
print dolGetButtonAction('', $langs->trans('ClassifyBilled'), 'default', $_SERVER["PHP_SELF"].'?action=classifybilled&token='.newToken().'&id='.$object->id, '');
|
||||
}
|
||||
|
|
@ -2705,7 +2705,7 @@ if ($action == 'create') {
|
|||
}
|
||||
|
||||
// Cancel
|
||||
if ($object->statut == Expedition::STATUS_VALIDATED) {
|
||||
if ($object->status == Expedition::STATUS_VALIDATED) {
|
||||
if ($user->hasRight('expedition', 'creer')) {
|
||||
print dolGetButtonAction('', $langs->trans('Cancel'), 'danger', $_SERVER["PHP_SELF"].'?action=cancel&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', '');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue