Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0
Conflicts: htdocs/fourn/class/fournisseur.commande.class.php
This commit is contained in:
commit
dee2a373c1
@ -178,6 +178,7 @@ class mod_facture_mars extends ModeleNumRefFactures
|
|||||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture";
|
$sql.= " FROM ".MAIN_DB_PREFIX."facture";
|
||||||
$sql.= " WHERE facnumber LIKE '".$prefix."____-".$num."'";
|
$sql.= " WHERE facnumber LIKE '".$prefix."____-".$num."'";
|
||||||
$sql.= " AND entity IN (".getEntity('invoicenumber').")";
|
$sql.= " AND entity IN (".getEntity('invoicenumber').")";
|
||||||
|
$sql.= " ORDER BY ref DESC";
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::getNextValue", LOG_DEBUG);
|
dol_syslog(get_class($this)."::getNextValue", LOG_DEBUG);
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
|
|||||||
@ -194,6 +194,7 @@ class mod_facture_terre extends ModeleNumRefFactures
|
|||||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture";
|
$sql.= " FROM ".MAIN_DB_PREFIX."facture";
|
||||||
$sql.= " WHERE facnumber LIKE '".$prefix."____-".$num."'";
|
$sql.= " WHERE facnumber LIKE '".$prefix."____-".$num."'";
|
||||||
$sql.= " AND entity IN (".getEntity('invoicenumber').")";
|
$sql.= " AND entity IN (".getEntity('invoicenumber').")";
|
||||||
|
$sql.= " ORDER BY ref DESC";
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::getNextValue", LOG_DEBUG);
|
dol_syslog(get_class($this)."::getNextValue", LOG_DEBUG);
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
|
|||||||
@ -3165,6 +3165,8 @@ class CommandeFournisseurLigne extends CommonOrderLine
|
|||||||
{
|
{
|
||||||
$objp = $this->db->fetch_object($result);
|
$objp = $this->db->fetch_object($result);
|
||||||
|
|
||||||
|
if (!empty($objp))
|
||||||
|
{
|
||||||
$this->rowid = $objp->rowid;
|
$this->rowid = $objp->rowid;
|
||||||
$this->id = $objp->rowid;
|
$this->id = $objp->rowid;
|
||||||
$this->fk_commande = $objp->fk_commande;
|
$this->fk_commande = $objp->fk_commande;
|
||||||
@ -3210,6 +3212,13 @@ class CommandeFournisseurLigne extends CommonOrderLine
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
$this->error='Supplier order line with id='.$rowid.' not found';
|
||||||
|
dol_syslog(get_class($this)."::fetch Error ".$this->error, LOG_ERR);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($this->db);
|
dol_print_error($this->db);
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@ -1798,7 +1798,7 @@ if ($action == 'create')
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create an order
|
// Create an order
|
||||||
if (! empty($conf->commande->enabled) && $object->statut == SupplierProposal::STATUS_SIGNED) {
|
if (! empty($conf->fournisseur->enabled) && $object->statut == SupplierProposal::STATUS_SIGNED) {
|
||||||
if ($user->rights->fournisseur->commande->creer) {
|
if ($user->rights->fournisseur->commande->creer) {
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="' . DOL_URL_ROOT . '/fourn/commande/card.php?action=create&origin=' . $object->element . '&originid=' . $object->id . '&socid=' . $object->socid . '">' . $langs->trans("AddOrder") . '</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="' . DOL_URL_ROOT . '/fourn/commande/card.php?action=create&origin=' . $object->element . '&originid=' . $object->id . '&socid=' . $object->socid . '">' . $langs->trans("AddOrder") . '</a></div>';
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user