Use of quantity 0 for option lines in commercial proposal is always enabled.
This commit is contained in:
parent
a4cdd7fb92
commit
79be7c4111
@ -118,10 +118,12 @@ if ($_POST["action"] == 'setadddeliveryaddress')
|
||||
dolibarr_set_const($db, "PROPALE_ADD_DELIVERY_ADDRESS",$_POST["value"]);
|
||||
}
|
||||
|
||||
/*
|
||||
if ($_POST["action"] == 'setuseoptionline')
|
||||
{
|
||||
dolibarr_set_const($db, "PROPALE_USE_OPTION_LINE",$_POST["value"]);
|
||||
}
|
||||
*/
|
||||
|
||||
if ($_POST["action"] == 'setclassifiedinvoiced')
|
||||
{
|
||||
@ -476,6 +478,7 @@ print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'
|
||||
print "</td></tr>\n";
|
||||
print '</form>';
|
||||
|
||||
/*
|
||||
$var=! $var;
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="action" value="setuseoptionline">';
|
||||
@ -487,6 +490,7 @@ print '</td><td align="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print "</td></tr>\n";
|
||||
print '</form>';
|
||||
*/
|
||||
|
||||
if ($conf->commande->enabled)
|
||||
{
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
||||
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
||||
|
||||
@ -277,6 +277,7 @@ class Propal extends CommonObject
|
||||
// Clean parameters
|
||||
$remise_percent=price2num($remise_percent);
|
||||
$qty=price2num($qty);
|
||||
/*
|
||||
if ($conf->global->PROPALE_USE_OPTION_LINE && !$qty)
|
||||
{
|
||||
$qty=0;
|
||||
@ -285,6 +286,7 @@ class Propal extends CommonObject
|
||||
{
|
||||
$qty=1;
|
||||
}
|
||||
*/
|
||||
$pu_ht=price2num($pu_ht);
|
||||
$pu_ttc=price2num($pu_ttc);
|
||||
$txtva=price2num($txtva);
|
||||
@ -335,7 +337,8 @@ class Propal extends CommonObject
|
||||
$ligne->total_ttc=$total_ttc;
|
||||
|
||||
// Mise en option de la ligne
|
||||
if ($conf->global->PROPALE_USE_OPTION_LINE && !$qty) $ligne->special_code=3;
|
||||
//if ($conf->global->PROPALE_USE_OPTION_LINE && !$qty) $ligne->special_code=3;
|
||||
if (empty($qty)) $ligne->special_code=3;
|
||||
|
||||
// \TODO Ne plus utiliser
|
||||
$ligne->price=$price;
|
||||
@ -395,6 +398,7 @@ class Propal extends CommonObject
|
||||
// Nettoyage param<61>tres
|
||||
$remise_percent=price2num($remise_percent);
|
||||
$qty=price2num($qty);
|
||||
/*
|
||||
if ($conf->global->PROPALE_USE_OPTION_LINE && !$qty)
|
||||
{
|
||||
$qty=0;
|
||||
@ -404,6 +408,7 @@ class Propal extends CommonObject
|
||||
{
|
||||
$qty=1;
|
||||
}
|
||||
*/
|
||||
$pu = price2num($pu);
|
||||
$txtva = price2num($txtva);
|
||||
|
||||
@ -435,15 +440,9 @@ class Propal extends CommonObject
|
||||
$sql.= " , total_tva=".price2num($total_tva);
|
||||
$sql.= " , total_ttc=".price2num($total_ttc);
|
||||
$sql.= " , info_bits=".$info_bits;
|
||||
if ($conf->global->PROPALE_USE_OPTION_LINE && !$qty)
|
||||
{
|
||||
$sql.= " , special_code=3";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql.= " , special_code=0";
|
||||
}
|
||||
$sql.= " WHERE rowid = '".$rowid."';";
|
||||
//if ($conf->global->PROPALE_USE_OPTION_LINE && !$qty)
|
||||
$sql.= " , special_code=".(empty($qty)?"3":"0");
|
||||
$sql.= " WHERE rowid = '".$rowid."'";
|
||||
|
||||
$result=$this->db->query($sql);
|
||||
if ($result > 0)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user