FIX Warning on purchase order + Property fk_commande not defined
This commit is contained in:
parent
f973dbca0b
commit
b6012e07d8
@ -489,7 +489,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
|
||||
$this->lines = array();
|
||||
|
||||
$sql = "SELECT l.rowid, l.ref as ref_supplier, l.fk_product, l.product_type, l.label, l.description, l.qty,";
|
||||
$sql = "SELECT l.rowid, l.fk_commande, l.ref as ref_supplier, l.fk_product, l.product_type, l.label, l.description, l.qty,";
|
||||
$sql .= " l.vat_src_code, l.tva_tx, l.remise_percent, l.subprice,";
|
||||
$sql .= " l.localtax1_tx, l. localtax2_tx, l.localtax1_type, l. localtax2_type, l.total_localtax1, l.total_localtax2,";
|
||||
$sql .= " l.total_ht, l.total_tva, l.total_ttc, l.special_code, l.fk_parent_line, l.rang,";
|
||||
@ -519,6 +519,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
$line = new CommandeFournisseurLigne($this->db);
|
||||
|
||||
$line->id = $objp->rowid;
|
||||
$line->fk_commande = $objp->fk_commande;
|
||||
$line->desc = $objp->description;
|
||||
$line->description = $objp->description;
|
||||
$line->qty = $objp->qty;
|
||||
|
||||
@ -2093,7 +2093,7 @@ if ($action == 'create') {
|
||||
}
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Date").'</td><td>';
|
||||
print $object->date_commande ? dol_print_date($object->date_commande, $usehourmin ? 'dayhour' : 'day') : '';
|
||||
if ($object->hasDelay() && !empty($object->date_delivery) && !empty($object->date_commande)) {
|
||||
if ($object->hasDelay() && !empty($object->delivery_date) && !empty($object->date_commande)) {
|
||||
print ' '.img_picto($langs->trans("Late").' : '.$object->showDelay(), "warning");
|
||||
}
|
||||
print "</td></tr>";
|
||||
@ -2263,7 +2263,7 @@ if ($action == 'create') {
|
||||
$usehourmin = 1;
|
||||
}
|
||||
print $form->selectDate($object->delivery_date ? $object->delivery_date : -1, 'liv_', $usehourmin, $usehourmin, '', "setdate_livraison");
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans('Modify').'">';
|
||||
print '<input type="submit" class="button button-edit smallpaddingimp valign middle" value="'.$langs->trans('Modify').'">';
|
||||
print '</form>';
|
||||
} else {
|
||||
$usehourmin = 'day';
|
||||
@ -2271,7 +2271,7 @@ if ($action == 'create') {
|
||||
$usehourmin = 'dayhour';
|
||||
}
|
||||
print $object->delivery_date ? dol_print_date($object->delivery_date, $usehourmin) : ' ';
|
||||
if ($object->hasDelay() && !empty($object->delivery_date)) {
|
||||
if ($object->hasDelay() && !empty($object->delivery_date) && ($object->statut == $object::STATUS_ORDERSENT || $object->statut == $object::STATUS_RECEIVED_PARTIALLY)) {
|
||||
print ' '.img_picto($langs->trans("Late").' : '.$object->showDelay(), "warning");
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user