New: Some changes to support the type of line in entities.
This commit is contained in:
parent
c52751276a
commit
c7bd24e05f
@ -822,8 +822,7 @@ else
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
if ($conf->produit->enabled && $fac->lignes[$i]->fk_product)
|
if ($conf->produit->enabled && $fac->lignes[$i]->fk_product)
|
||||||
{
|
{
|
||||||
print '<input type="hidden" name="idprod" value="'.$fac->lignes[$i]->fk_product.'">';
|
print '<input type="hidden" name="productid" value="'.$objp->fk_product.'">';
|
||||||
$product_static=new ProductFournisseur($db);
|
|
||||||
$product_static->fetch($fac->lignes[$i]->fk_product);
|
$product_static->fetch($fac->lignes[$i]->fk_product);
|
||||||
$text=$product_static->getNomUrl(1);
|
$text=$product_static->getNomUrl(1);
|
||||||
$text.= ' - '.$product_static->libelle;
|
$text.= ' - '.$product_static->libelle;
|
||||||
@ -832,8 +831,8 @@ else
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// TODO Select type (service or product)
|
print $html->select_type_of_lines($fac->lignes[$i]->product_type,'type',1);
|
||||||
|
if ($conf->produit->enabled && $conf->service->enabled) print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Description - Editor wysiwyg
|
// Description - Editor wysiwyg
|
||||||
@ -873,12 +872,20 @@ else
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
if ($fac->lignes[$i]->fk_product)
|
if ($fac->lignes[$i]->fk_product)
|
||||||
{
|
{
|
||||||
|
print '<a name="'.$objp->rowid.'"></a>'; // ancre pour retourner sur la ligne
|
||||||
|
|
||||||
$product_static=new ProductFournisseur($db);
|
$product_static=new ProductFournisseur($db);
|
||||||
$product_static->fetch($fac->lignes[$i]->fk_product);
|
$product_static->fetch($fac->lignes[$i]->fk_product);
|
||||||
$text=$product_static->getNomUrl(1);
|
$text=$product_static->getNomUrl(1);
|
||||||
$text.= ' - '.$product_static->libelle;
|
$text.= ' - '.$product_static->libelle;
|
||||||
print $text;
|
$description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($fac->lignes[$i]->description));
|
||||||
print '<br>';
|
print $html->textwithtooltip($text,$description,3,'','',$i);
|
||||||
|
|
||||||
|
// Show range
|
||||||
|
print_date_range($objp->date_start,$objp->date_end);
|
||||||
|
|
||||||
|
// Add description in form
|
||||||
|
if ($conf->global->PRODUIT_DESC_IN_FORM) print ($objp->description && $objp->description!=$objp->product)?'<br>'.dol_htmlentitiesbr($objp->description):'';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Description - Editor wysiwyg
|
// Description - Editor wysiwyg
|
||||||
|
|||||||
@ -153,7 +153,8 @@ class FactureFournisseur extends Facture
|
|||||||
$this->lignes[$i]->qty,
|
$this->lignes[$i]->qty,
|
||||||
$this->lignes[$i]->fk_product,
|
$this->lignes[$i]->fk_product,
|
||||||
'HT',
|
'HT',
|
||||||
$this->lignes[$i]->info_bits
|
$this->lignes[$i]->info_bits,
|
||||||
|
$this->lignes[$i]->product_type
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -240,9 +241,7 @@ class FactureFournisseur extends Facture
|
|||||||
|
|
||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
|
|
||||||
/*
|
// Lines
|
||||||
* Lignes
|
|
||||||
*/
|
|
||||||
$result=$this->fetch_lines();
|
$result=$this->fetch_lines();
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
@ -328,8 +327,7 @@ class FactureFournisseur extends Facture
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Recup<EFBFBD>re l'objet fournisseur li<EFBFBD> <EFBFBD> la facture
|
* \brief Load supplier
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
function fetch_fournisseur()
|
function fetch_fournisseur()
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user