Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts: htdocs/core/modules/facture/mod_facture_mars.php htdocs/core/modules/facture/mod_facture_terre.php htdocs/fourn/commande/list.php
This commit is contained in:
commit
35f65a571c
@ -190,6 +190,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', 1, $invoice).")";
|
$sql.= " AND entity IN (".getEntity('invoicenumber', 1, $invoice).")";
|
||||||
|
$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);
|
||||||
|
|||||||
@ -205,6 +205,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', 1, $invoice).")";
|
$sql.= " AND entity IN (".getEntity('invoicenumber', 1, $invoice).")";
|
||||||
|
$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);
|
||||||
|
|||||||
@ -3245,6 +3245,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;
|
||||||
@ -3290,6 +3292,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;
|
||||||
|
|||||||
@ -59,18 +59,18 @@ $search_deliveryday=GETPOST("search_deliveryday","int");
|
|||||||
$sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml'));
|
$sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml'));
|
||||||
|
|
||||||
$search_product_category=GETPOST('search_product_category','int');
|
$search_product_category=GETPOST('search_product_category','int');
|
||||||
$search_ref=GETPOST('search_ref');
|
$search_ref=GETPOST('search_ref','alpha');
|
||||||
$search_refsupp=GETPOST('search_refsupp');
|
$search_refsupp=GETPOST('search_refsupp','alpha');
|
||||||
$search_company=GETPOST('search_company','alpha');
|
$search_company=GETPOST('search_company','alpha');
|
||||||
$search_town=GETPOST('search_town','alpha');
|
$search_town=GETPOST('search_town','alpha');
|
||||||
$search_zip=GETPOST('search_zip','alpha');
|
$search_zip=GETPOST('search_zip','alpha');
|
||||||
$search_state=trim(GETPOST("search_state"));
|
$search_state=trim(GETPOST("search_state",'alpha'));
|
||||||
$search_country=GETPOST("search_country",'int');
|
$search_country=GETPOST("search_country",'int');
|
||||||
$search_type_thirdparty=GETPOST("search_type_thirdparty",'int');
|
$search_type_thirdparty=GETPOST("search_type_thirdparty",'int');
|
||||||
$search_user=GETPOST('search_user','int');
|
$search_user=GETPOST('search_user','int');
|
||||||
$search_request_author=GETPOST('search_request_author','alpha');
|
$search_request_author=GETPOST('search_request_author','alpha');
|
||||||
$search_ht=GETPOST('search_ht');
|
$search_ht=GETPOST('search_ht','alpha');
|
||||||
$search_ttc=GETPOST('search_ttc');
|
$search_ttc=GETPOST('search_ttc','alpha');
|
||||||
$search_status=(GETPOST('search_status','alpha')!=''?GETPOST('search_status','alpha'):GETPOST('statut','alpha')); // alpha and not intbecause it can be '6,7'
|
$search_status=(GETPOST('search_status','alpha')!=''?GETPOST('search_status','alpha'):GETPOST('statut','alpha')); // alpha and not intbecause it can be '6,7'
|
||||||
$optioncss = GETPOST('optioncss','alpha');
|
$optioncss = GETPOST('optioncss','alpha');
|
||||||
$socid = GETPOST('socid','int');
|
$socid = GETPOST('socid','int');
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2014-2016 Charlie BENKE <charlie@patas-monkey.com>
|
* Copyright (C) 2014-2016 Charlie BENKE <charlie@patas-monkey.com>
|
||||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
|
* Copyright (C) 2019 Pierre Ardoin <mapiolca@me.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -172,12 +173,12 @@ $total=0;
|
|||||||
if ($type == '0')
|
if ($type == '0')
|
||||||
{
|
{
|
||||||
print $statProducts;
|
print $statProducts;
|
||||||
$total=round($prodser[0][0])+round($prodser[0][1])+round($prodser[0][2]);
|
$total=round($prodser[0][0])+round($prodser[0][1])+round($prodser[0][2])+round($prodser[0][3]);
|
||||||
}
|
}
|
||||||
else if ($type == '1')
|
else if ($type == '1')
|
||||||
{
|
{
|
||||||
print $statServices;
|
print $statServices;
|
||||||
$total=round($prodser[1][0])+round($prodser[1][1])+round($prodser[1][2]);
|
$total=round($prodser[1][0])+round($prodser[1][1])+round($prodser[1][2])+round($prodser[1][3]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1801,7 +1801,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