Fix: product_type is lost
This commit is contained in:
parent
ff2ab603ee
commit
0fba80cc6f
@ -131,6 +131,7 @@ class Commande extends CommonObject
|
||||
$CommLigne->remise_percent = $propal->lignes[$i]->remise_percent;
|
||||
$CommLigne->fk_product = $propal->lignes[$i]->fk_product;
|
||||
$CommLigne->info_bits = $propal->lignes[$i]->info_bits;
|
||||
$CommLigne->product_type = $propal->lignes[$i]->product_type;
|
||||
$this->lines[$i] = $CommLigne;
|
||||
}
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -698,7 +698,10 @@ if ($_POST['action'] == 'add' && $user->rights->facture->creer)
|
||||
$date_end,
|
||||
0,
|
||||
$prop->lignes[$i]->info_bits,
|
||||
$prop->lignes[$i]->fk_remise_except
|
||||
$prop->lignes[$i]->fk_remise_except,
|
||||
'HT',
|
||||
0,
|
||||
$prop->lignes[$i]->product_type
|
||||
);
|
||||
|
||||
if ($result < 0)
|
||||
@ -753,7 +756,10 @@ if ($_POST['action'] == 'add' && $user->rights->facture->creer)
|
||||
$date_end,
|
||||
0,
|
||||
$lines[$i]->info_bits,
|
||||
$lines[$i]->fk_remise_except
|
||||
$lines[$i]->fk_remise_except,
|
||||
'HT',
|
||||
0,
|
||||
$lines[$i]->product_type
|
||||
);
|
||||
|
||||
if ($result < 0)
|
||||
@ -1892,7 +1898,7 @@ if ($_GET['action'] == 'create')
|
||||
{
|
||||
$title=$langs->trans('Products');
|
||||
|
||||
$sql = 'SELECT pt.rowid, pt.subprice, pt.tva_tx, pt.qty, pt.fk_remise_except, pt.remise_percent,';
|
||||
$sql = 'SELECT pt.rowid, pt.subprice, pt.tva_tx, pt.qty, pt.fk_remise_except, pt.remise_percent, pt.product_type,';
|
||||
$sql.= ' pt.description, pt.info_bits, pt.date_start as date_debut_prevue, pt.date_end as date_fin_prevue,';
|
||||
$sql.= ' p.label as product, p.ref, p.rowid as prodid';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'commandedet as pt';
|
||||
|
||||
@ -870,7 +870,7 @@ class Propal extends CommonObject
|
||||
* Lignes propales liees a un produit ou non
|
||||
*/
|
||||
$sql = "SELECT d.description, d.price, d.tva_tx, d.qty, d.fk_remise_except, d.remise_percent, d.subprice, d.fk_product,";
|
||||
$sql.= " d.info_bits, d.total_ht, d.total_tva, d.total_ttc, d.marge_tx, d.marque_tx, d.special_code, d.rang,";
|
||||
$sql.= " d.info_bits, d.total_ht, d.total_tva, d.total_ttc, d.marge_tx, d.marque_tx, d.special_code, d.rang, d.product_type,";
|
||||
$sql.= " p.ref, p.label, p.description as product_desc";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."propaldet as d";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON d.fk_product = p.rowid";
|
||||
@ -889,6 +889,7 @@ class Propal extends CommonObject
|
||||
|
||||
$ligne = new PropaleLigne($this->db);
|
||||
|
||||
$ligne->product_type = $objp->product_type;
|
||||
$ligne->desc = $objp->description; // Description ligne
|
||||
$ligne->qty = $objp->qty;
|
||||
$ligne->tva_tx = $objp->tva_tx;
|
||||
@ -1121,7 +1122,7 @@ class Propal extends CommonObject
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief D<EFBFBD>finit une remise globale relative sur la proposition
|
||||
* \brief Definit une remise globale relative sur la proposition
|
||||
* \param user Objet utilisateur qui modifie
|
||||
* \param remise Montant remise
|
||||
* \return int <0 si ko, >0 si ok
|
||||
@ -1154,7 +1155,7 @@ class Propal extends CommonObject
|
||||
|
||||
|
||||
/**
|
||||
* \brief D<EFBFBD>finit une remise globale absolue sur la proposition
|
||||
* \brief Definit une remise globale absolue sur la proposition
|
||||
* \param user Objet utilisateur qui modifie
|
||||
* \param remise Montant remise
|
||||
* \return int <0 si ko, >0 si ok
|
||||
@ -2149,7 +2150,7 @@ class PropaleLigne
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Recup<EFBFBD>re l'objet ligne de propal
|
||||
* \brief Recupere l'objet ligne de propal
|
||||
* \param rowid id de la ligne de propal
|
||||
*/
|
||||
function fetch($rowid)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user