* fix tooltips * Update product.class.php * Update product.class.php
This commit is contained in:
parent
da70b46647
commit
b40e033f7b
2 changed files with 14 additions and 8 deletions
|
|
@ -160,7 +160,7 @@ print '<div class="fichetwothirdright">';
|
|||
* Last modified proposals
|
||||
*/
|
||||
|
||||
$sql = "SELECT c.rowid, c.entity, c.ref, c.fk_statut as status, date_cloture as datec, c.tms as datem,";
|
||||
$sql = "SELECT c.rowid, c.entity, c.ref, c.total_ht, c.total_tva, c.total_ttc, c.fk_statut as status, date_cloture as datec, c.tms as datem,";
|
||||
$sql .= " s.nom as socname, s.rowid as socid, s.canvas, s.client, s.email, s.code_compta";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."propal as c,";
|
||||
$sql .= " ".MAIN_DB_PREFIX."societe as s";
|
||||
|
|
@ -200,6 +200,9 @@ if ($resql) {
|
|||
|
||||
$propalstatic->id = $obj->rowid;
|
||||
$propalstatic->ref = $obj->ref;
|
||||
$propalstatic->total_ht = $obj->total_ht;
|
||||
$propalstatic->total_tva = $obj->total_tva;
|
||||
$propalstatic->total_ttc = $obj->total_ttc;
|
||||
|
||||
$companystatic->id = $obj->socid;
|
||||
$companystatic->name = $obj->socname;
|
||||
|
|
@ -251,7 +254,7 @@ if ($resql) {
|
|||
*/
|
||||
if (isModEnabled("propal") && $user->hasRight('propal', 'lire')) {
|
||||
$sql = "SELECT s.nom as socname, s.rowid as socid, s.canvas, s.client, s.email, s.code_compta";
|
||||
$sql .= ", p.rowid as propalid, p.entity, p.total_ttc, p.total_ht, p.ref, p.fk_statut, p.datep as dp, p.fin_validite as dfv";
|
||||
$sql .= ", p.rowid as propalid, p.entity, p.total_ttc, p.total_ht, p.total_tva, p.ref, p.fk_statut, p.datep as dp, p.fin_validite as dfv";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql .= ", ".MAIN_DB_PREFIX."propal as p";
|
||||
$sql .= " WHERE p.fk_soc = s.rowid";
|
||||
|
|
@ -290,6 +293,9 @@ if (isModEnabled("propal") && $user->hasRight('propal', 'lire')) {
|
|||
|
||||
$propalstatic->id = $obj->propalid;
|
||||
$propalstatic->ref = $obj->ref;
|
||||
$propalstatic->total_ht = $obj->total_ht;
|
||||
$propalstatic->total_tva = $obj->total_tva;
|
||||
$propalstatic->total_ttc = $obj->total_ttc;
|
||||
|
||||
$companystatic->id = $obj->socid;
|
||||
$companystatic->name = $obj->socname;
|
||||
|
|
|
|||
|
|
@ -2361,14 +2361,14 @@ class Product extends CommonObject
|
|||
|
||||
if ($newprice !== '' || $newprice === 0) {
|
||||
if ($newpricebase == 'TTC') {
|
||||
$price_ttc = price2num($newprice, 'MU');
|
||||
$price_ttc = (float) price2num($newprice, 'MU');
|
||||
$price = (float) price2num($newprice) / (1 + ((float) $newvat / 100));
|
||||
$price = price2num($price, 'MU');
|
||||
$price = (float) price2num($price, 'MU');
|
||||
|
||||
if ($newminprice != '' || $newminprice == 0) {
|
||||
$price_min_ttc = price2num($newminprice, 'MU');
|
||||
$price_min_ttc = (float) price2num($newminprice, 'MU');
|
||||
$price_min = (float) price2num($newminprice) / (1 + ($newvat / 100));
|
||||
$price_min = price2num($price_min, 'MU');
|
||||
$price_min = (float) price2num($price_min, 'MU');
|
||||
} else {
|
||||
$price_min = 0;
|
||||
$price_min_ttc = 0;
|
||||
|
|
@ -2379,9 +2379,9 @@ class Product extends CommonObject
|
|||
$price_ttc = (float) price2num($price_ttc, 'MU');
|
||||
|
||||
if ($newminprice !== '' || $newminprice === 0) {
|
||||
$price_min = price2num($newminprice, 'MU');
|
||||
$price_min = (float) price2num($newminprice, 'MU');
|
||||
$price_min_ttc = (float) price2num($newminprice) * (1 + ($newvat / 100));
|
||||
$price_min_ttc = price2num($price_min_ttc, 'MU');
|
||||
$price_min_ttc = (float) price2num($price_min_ttc, 'MU');
|
||||
//print 'X'.$newminprice.'-'.$price_min;
|
||||
} else {
|
||||
$price_min = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue