Ajoute option pour permettre de ne pas afficher les produits définis dès la création
This commit is contained in:
parent
0df017047c
commit
e6350aa25a
@ -30,7 +30,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
|
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/includes/modules/propale/modules_propale.php');
|
include_once(DOL_DOCUMENT_ROOT.'/includes/modules/propale/modules_propale.php');
|
||||||
if (defined("PROPALE_ADDON") && is_readable(DOL_DOCUMENT_ROOT ."/includes/modules/propale/".PROPALE_ADDON.".php"))
|
if (defined("PROPALE_ADDON") && is_readable(DOL_DOCUMENT_ROOT ."/includes/modules/propale/".PROPALE_ADDON.".php"))
|
||||||
{
|
{
|
||||||
@ -104,7 +104,7 @@ if ($_GET["action"] == 'create')
|
|||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<tr><td>'.$langs->trans("Ref").'</td><td colspan="2"><input name="ref" value="'.$numpr.'"></td></tr>';
|
print '<tr><td>'.$langs->trans("Ref").'</td><td colspan="2"><input name="ref" value="'.$numpr.'"></td></tr>';
|
||||||
|
|
||||||
// Reference client
|
// Reference client
|
||||||
print '<tr><td>'.$langs->trans('RefCustomer').'</td><td>';
|
print '<tr><td>'.$langs->trans('RefCustomer').'</td><td>';
|
||||||
print '<input type="text" name="ref_client" value=""></td>';
|
print '<input type="text" name="ref_client" value=""></td>';
|
||||||
@ -115,7 +115,7 @@ if ($_GET["action"] == 'create')
|
|||||||
print '<input type="hidden" name="socidp" value="'.$soc->id.'">';
|
print '<input type="hidden" name="socidp" value="'.$soc->id.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Contact de la propale
|
* Contact de la propale
|
||||||
*/
|
*/
|
||||||
@ -162,7 +162,7 @@ if ($_GET["action"] == 'create')
|
|||||||
if ($relative_discount)
|
if ($relative_discount)
|
||||||
{
|
{
|
||||||
print $langs->trans("CompanyHasRelativeDiscount",$relative_discount);
|
print $langs->trans("CompanyHasRelativeDiscount",$relative_discount);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $langs->trans("CompanyHasNoRelativeDiscount");
|
print $langs->trans("CompanyHasNoRelativeDiscount");
|
||||||
@ -180,7 +180,7 @@ if ($_GET["action"] == 'create')
|
|||||||
if ($absolute_discount)
|
if ($absolute_discount)
|
||||||
{
|
{
|
||||||
print $langs->trans("CompanyHasAbsoluteDiscount",$absolute_discount,$langs->trans("Currency".$conf->monnaie));
|
print $langs->trans("CompanyHasAbsoluteDiscount",$absolute_discount,$langs->trans("Currency".$conf->monnaie));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $langs->trans("CompanyHasNoAbsoluteDiscount");
|
print $langs->trans("CompanyHasNoAbsoluteDiscount");
|
||||||
@ -212,7 +212,7 @@ if ($conf->expedition->enabled)
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adresse de livraison
|
// Adresse de livraison
|
||||||
if ($conf->global->PROPALE_ADD_DELIVERY_ADDRESS)
|
if ($conf->global->PROPALE_ADD_DELIVERY_ADDRESS)
|
||||||
{
|
{
|
||||||
@ -253,7 +253,7 @@ if ($conf->expedition->enabled)
|
|||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Combobox pour la fonction de copie
|
* Combobox pour la fonction de copie
|
||||||
*/
|
*/
|
||||||
@ -264,7 +264,7 @@ if ($conf->expedition->enabled)
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
$liste_propal = array();
|
$liste_propal = array();
|
||||||
$liste_propal[0] = '';
|
$liste_propal[0] = '';
|
||||||
$sql ="SELECT p.rowid as id, CONCAT(p.ref, '-', s.nom) as lib";
|
$sql ="SELECT p.rowid as id, CONCAT(p.ref, ' - ', s.nom) as lib";
|
||||||
$sql.=" FROM ".MAIN_DB_PREFIX."propal p, ".MAIN_DB_PREFIX."societe s";
|
$sql.=" FROM ".MAIN_DB_PREFIX."propal p, ".MAIN_DB_PREFIX."societe s";
|
||||||
$sql.=" WHERE s.idp = p.fk_soc AND fk_statut <> 0 ORDER BY Id";
|
$sql.=" WHERE s.idp = p.fk_soc AND fk_statut <> 0 ORDER BY Id";
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
@ -285,44 +285,48 @@ if ($conf->expedition->enabled)
|
|||||||
dolibarr_print_error($db);
|
dolibarr_print_error($db);
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td colspan="3"> </td></tr>';
|
if ($conf->global->PRODUCT_SHOW_WHEN_CREATE) print '<tr><td colspan="3"> </td></tr>';
|
||||||
|
|
||||||
print '<tr><td valign="top"><input type="radio" name="createmode" value="empty" checked="true"></td>';
|
print '<tr><td valign="top"><input type="radio" name="createmode" value="empty" checked="true"></td>';
|
||||||
print '<td valign="top" colspan="2">'.$langs->trans("CreateEmptyPropal").'</td></tr>';
|
print '<td valign="top" colspan="2">'.$langs->trans("CreateEmptyPropal").'</td></tr>';
|
||||||
print '<tr><td colspan="3">';
|
|
||||||
if ($conf->produit->enabled || $conf->service->enabled)
|
|
||||||
{
|
|
||||||
$lib=$langs->trans("ProductsAndServices");
|
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
if ($conf->global->PRODUCT_SHOW_WHEN_CREATE)
|
||||||
print '<tr>';
|
{
|
||||||
print '<td>'.$lib.'</td>';
|
print '<tr><td colspan="3">';
|
||||||
print '<td>'.$langs->trans("Qty").'</td>';
|
if ($conf->produit->enabled || $conf->service->enabled)
|
||||||
print '<td>'.$langs->trans("ReductionShort").'</td>';
|
{
|
||||||
print '</tr>';
|
$lib=$langs->trans("ProductsAndServices");
|
||||||
for ($i = 1 ; $i <= $conf->global->PROPALE_NEW_FORM_NB_PRODUCT ; $i++)
|
|
||||||
{
|
|
||||||
print '<tr><td>';
|
|
||||||
// multiprix
|
|
||||||
if($conf->global->PRODUIT_MULTIPRICES == 1)
|
|
||||||
$html->select_produits('',"idprod".$i,'',$conf->produit->limit_size,$soc->price_level);
|
|
||||||
else
|
|
||||||
$html->select_produits('',"idprod".$i,'',$conf->produit->limit_size);
|
|
||||||
print '</td>';
|
|
||||||
print '<td><input type="text" size="2" name="qty'.$i.'" value="1"></td>';
|
|
||||||
print '<td><input type="text" size="2" name="remise'.$i.'" value="'.$soc->remise_client.'">%</td>';
|
|
||||||
print '</tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print "</table>";
|
print '<table class="border" width="100%">';
|
||||||
|
print '<tr>';
|
||||||
|
print '<td>'.$lib.'</td>';
|
||||||
|
print '<td>'.$langs->trans("Qty").'</td>';
|
||||||
|
print '<td>'.$langs->trans("ReductionShort").'</td>';
|
||||||
|
print '</tr>';
|
||||||
|
for ($i = 1 ; $i <= $conf->global->PROPALE_NEW_FORM_NB_PRODUCT ; $i++)
|
||||||
|
{
|
||||||
|
print '<tr><td>';
|
||||||
|
// multiprix
|
||||||
|
if($conf->global->PRODUIT_MULTIPRICES == 1)
|
||||||
|
$html->select_produits('',"idprod".$i,'',$conf->produit->limit_size,$soc->price_level);
|
||||||
|
else
|
||||||
|
$html->select_produits('',"idprod".$i,'',$conf->produit->limit_size);
|
||||||
|
print '</td>';
|
||||||
|
print '<td><input type="text" size="2" name="qty'.$i.'" value="1"></td>';
|
||||||
|
print '<td><input type="text" size="2" name="remise'.$i.'" value="'.$soc->remise_client.'">%</td>';
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
}
|
print "</table>";
|
||||||
else
|
|
||||||
{
|
}
|
||||||
print ' ';
|
else
|
||||||
}
|
{
|
||||||
print '</td></tr>';
|
print ' ';
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|||||||
@ -822,33 +822,36 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*
|
if ($conf->global->PRODUCT_SHOW_WHEN_CREATE)
|
||||||
* Services/produits prédéfinis
|
|
||||||
*/
|
|
||||||
$NBLINES=8;
|
|
||||||
|
|
||||||
print '<tr><td colspan="3">';
|
|
||||||
|
|
||||||
print '<table class="noborder">';
|
|
||||||
print '<tr><td>'.$langs->trans('ProductsAndServices').'</td>';
|
|
||||||
print '<td>'.$langs->trans('Qty').'</td>';
|
|
||||||
print '<td>'.$langs->trans('ReductionShort').'</td>';
|
|
||||||
print '</tr>';
|
|
||||||
for ($i = 1 ; $i <= $NBLINES ; $i++)
|
|
||||||
{
|
{
|
||||||
print '<tr><td>';
|
/*
|
||||||
// multiprix
|
* Services/produits prédéfinis
|
||||||
if($conf->global->PRODUIT_MULTIPRICES == 1)
|
*/
|
||||||
print $html->select_produits('','idprod'.$i,'',$conf->produit->limit_size,$soc->price_level);
|
$NBLINES=8;
|
||||||
else
|
|
||||||
print $html->select_produits('','idprod'.$i,'',$conf->produit->limit_size);
|
print '<tr><td colspan="3">';
|
||||||
print '</td>';
|
|
||||||
print '<td><input type="text" size="3" name="qty'.$i.'" value="1"></td>';
|
print '<table class="noborder">';
|
||||||
print '<td><input type="text" size="3" name="remise_percent'.$i.'" value="'.$soc->remise_client.'">%</td></tr>';
|
print '<tr><td>'.$langs->trans('ProductsAndServices').'</td>';
|
||||||
|
print '<td>'.$langs->trans('Qty').'</td>';
|
||||||
|
print '<td>'.$langs->trans('ReductionShort').'</td>';
|
||||||
|
print '</tr>';
|
||||||
|
for ($i = 1 ; $i <= $NBLINES ; $i++)
|
||||||
|
{
|
||||||
|
print '<tr><td>';
|
||||||
|
// multiprix
|
||||||
|
if($conf->global->PRODUIT_MULTIPRICES == 1)
|
||||||
|
print $html->select_produits('','idprod'.$i,'',$conf->produit->limit_size,$soc->price_level);
|
||||||
|
else
|
||||||
|
print $html->select_produits('','idprod'.$i,'',$conf->produit->limit_size);
|
||||||
|
print '</td>';
|
||||||
|
print '<td><input type="text" size="3" name="qty'.$i.'" value="1"></td>';
|
||||||
|
print '<td><input type="text" size="3" name="remise_percent'.$i.'" value="'.$soc->remise_client.'">%</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
print '</table>';
|
||||||
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
|
||||||
print '</td></tr>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -104,7 +104,7 @@ class box_comptes extends ModeleBoxes {
|
|||||||
);
|
);
|
||||||
|
|
||||||
$this->info_box_contents[$i][3] = array('align' => 'right',
|
$this->info_box_contents[$i][3] = array('align' => 'right',
|
||||||
'text' => price( $acc->solde() )
|
'text' => price($acc->solde())
|
||||||
);
|
);
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
@ -164,7 +164,7 @@ update llx_const set name='NOTIFICATION_EMAIL_FROM', visible=0 where name='MAIN_
|
|||||||
update llx_const set name='NOTIFICATION_EMAIL_FROM', visible=0 where name='MAIN_EMAIL_FROM';
|
update llx_const set name='NOTIFICATION_EMAIL_FROM', visible=0 where name='MAIN_EMAIL_FROM';
|
||||||
|
|
||||||
insert into llx_const(name,value,type,visible,note) values('MAIN_SHOW_DEVELOPMENT_MODULES','0','yesno',1,'Make development modules visible');
|
insert into llx_const(name,value,type,visible,note) values('MAIN_SHOW_DEVELOPMENT_MODULES','0','yesno',1,'Make development modules visible');
|
||||||
insert into llx_const(name,value,type,visible,note) values('PRODUCT_SHOW_WHEN_CREATE','1','yesno',1,'Add product list in first step of proposal, invoice creation');
|
insert into llx_const(name,value,type,visible,note) values('PRODUCT_SHOW_WHEN_CREATE','1','yesno',1,'Add products\' list in first step of proposal, invoice, order creation');
|
||||||
|
|
||||||
delete from llx_const where name in ('OSC_CATALOG_URL','OSC_LANGUAGE_ID');
|
delete from llx_const where name in ('OSC_CATALOG_URL','OSC_LANGUAGE_ID');
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user