NEW : insert_discount() functions handle
This commit is contained in:
parent
1e0d7d92a9
commit
c55008e8af
@ -1954,7 +1954,7 @@ class Facture extends CommonInvoice
|
|||||||
public function insert_discount($idremise)
|
public function insert_discount($idremise)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
|
||||||
@ -1986,6 +1986,13 @@ class Facture extends CommonInvoice
|
|||||||
$facligne->rang = -1;
|
$facligne->rang = -1;
|
||||||
$facligne->info_bits = 2;
|
$facligne->info_bits = 2;
|
||||||
|
|
||||||
|
if(!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
|
||||||
|
$facligne->rang = 1;
|
||||||
|
for ($ii = 1; $ii <= count($this->lines); $ii++) {
|
||||||
|
$this->updateRangOfLine($this->lines[$ii - 1]->id, $ii+1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Get buy/cost price of invoice that is source of discount
|
// Get buy/cost price of invoice that is source of discount
|
||||||
if ($remise->fk_facture_source > 0)
|
if ($remise->fk_facture_source > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1025,7 +1025,7 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
public function insert_discount($idremise)
|
public function insert_discount($idremise)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
|
||||||
@ -1058,6 +1058,13 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
$facligne->rang = -1;
|
$facligne->rang = -1;
|
||||||
$facligne->info_bits = 2;
|
$facligne->info_bits = 2;
|
||||||
|
|
||||||
|
if(!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
|
||||||
|
$facligne->rang = 1;
|
||||||
|
for ($ii = 1; $ii <= count($this->lines); $ii++) {
|
||||||
|
$this->updateRangOfLine($this->lines[$ii - 1]->id, $ii+1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Get buy/cost price of invoice that is source of discount
|
// Get buy/cost price of invoice that is source of discount
|
||||||
if ($remise->fk_invoice_supplier_source > 0)
|
if ($remise->fk_invoice_supplier_source > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user