Doxygen
This commit is contained in:
parent
381af3e6bc
commit
3f807a09b4
@ -2109,12 +2109,13 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
/**
|
/**
|
||||||
* Return the max number delivery delay in day
|
* Return the max number delivery delay in day
|
||||||
*
|
*
|
||||||
* @return string
|
* @param Translate $langs Language object
|
||||||
*/
|
* @return Translated string
|
||||||
|
*/
|
||||||
function getMaxDeliveryTimeDay($langs)
|
function getMaxDeliveryTimeDay($langs)
|
||||||
{
|
{
|
||||||
if (empty($this->lines)) return $langs->trans('Undefined');
|
if (empty($this->lines)) return $langs->trans('Undefined');
|
||||||
|
|
||||||
$nb = 0;
|
$nb = 0;
|
||||||
foreach ($this->lines as $line) {
|
foreach ($this->lines as $line) {
|
||||||
$obj = new ProductFournisseur($this->db);
|
$obj = new ProductFournisseur($this->db);
|
||||||
@ -2123,9 +2124,9 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
$obj->fetch($idp);
|
$obj->fetch($idp);
|
||||||
if ($obj->delivery_time_days > $nb) $nb = $obj->delivery_time_days;
|
if ($obj->delivery_time_days > $nb) $nb = $obj->delivery_time_days;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($nb === 0) return $langs->trans('Undefined');
|
if ($nb === 0) return $langs->trans('Undefined');
|
||||||
else return $nb.' '.$langs->trans('Days');
|
else return $nb.' '.$langs->trans('Days');
|
||||||
}
|
}
|
||||||
@ -2134,7 +2135,7 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Classe de gestion des lignes de commande
|
* Class to manage line orders
|
||||||
*/
|
*/
|
||||||
class CommandeFournisseurLigne extends CommonOrderLine
|
class CommandeFournisseurLigne extends CommonOrderLine
|
||||||
{
|
{
|
||||||
|
|||||||
@ -42,7 +42,7 @@ class ProductFournisseur extends Product
|
|||||||
|
|
||||||
var $id; // product id
|
var $id; // product id
|
||||||
var $fourn_ref; // deprecated
|
var $fourn_ref; // deprecated
|
||||||
var $delivery_time_days;
|
var $delivery_time_days;
|
||||||
var $ref_supplier; // ref supplier (can be set by get_buyprice)
|
var $ref_supplier; // ref supplier (can be set by get_buyprice)
|
||||||
var $vatrate_supplier; // default vat rate for this supplier/qty/product (can be set by get_buyprice)
|
var $vatrate_supplier; // default vat rate for this supplier/qty/product (can be set by get_buyprice)
|
||||||
|
|
||||||
@ -154,6 +154,7 @@ class ProductFournisseur extends Product
|
|||||||
* @param float $remise_percent Discount regarding qty (percent)
|
* @param float $remise_percent Discount regarding qty (percent)
|
||||||
* @param float $remise Discount regarding qty (amount)
|
* @param float $remise Discount regarding qty (amount)
|
||||||
* @param int $newnpr Set NPR or not
|
* @param int $newnpr Set NPR or not
|
||||||
|
* @param int $delivery_time_days Delay in days for delivery (max)
|
||||||
* @return int <0 if KO, >=0 if OK
|
* @return int <0 if KO, >=0 if OK
|
||||||
*/
|
*/
|
||||||
function update_buyprice($qty, $buyprice, $user, $price_base_type, $fourn, $availability, $ref_fourn, $tva_tx, $charges=0, $remise_percent=0, $remise=0, $newnpr=0, $delivery_time_days=0)
|
function update_buyprice($qty, $buyprice, $user, $price_base_type, $fourn, $availability, $ref_fourn, $tva_tx, $charges=0, $remise_percent=0, $remise=0, $newnpr=0, $delivery_time_days=0)
|
||||||
@ -528,7 +529,7 @@ class ProductFournisseur extends Product
|
|||||||
$record_array[]=$record;
|
$record_array[]=$record;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($record_array) == 0)
|
if (count($record_array) == 0)
|
||||||
{
|
{
|
||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
return 0;
|
return 0;
|
||||||
@ -537,7 +538,7 @@ class ProductFournisseur extends Product
|
|||||||
{
|
{
|
||||||
$min = -1;
|
$min = -1;
|
||||||
foreach($record_array as $record)
|
foreach($record_array as $record)
|
||||||
{
|
{
|
||||||
$fourn_price = $record["price"];
|
$fourn_price = $record["price"];
|
||||||
$fourn_unitprice = $record["unitprice"];
|
$fourn_unitprice = $record["unitprice"];
|
||||||
if (!empty($record["fk_supplier_price_expression"])) {
|
if (!empty($record["fk_supplier_price_expression"])) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user