Ajoute option pour permettre de ne pas afficher les produits définis dès la création

This commit is contained in:
Laurent Destailleur 2006-08-27 22:37:18 +00:00
parent 0df017047c
commit e6350aa25a
4 changed files with 75 additions and 68 deletions

View File

@ -286,10 +286,13 @@ if ($conf->expedition->enabled)
} }
print '</td></tr>'; print '</td></tr>';
print '<tr><td colspan="3">&nbsp;</td></tr>'; if ($conf->global->PRODUCT_SHOW_WHEN_CREATE) print '<tr><td colspan="3">&nbsp;</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>';
if ($conf->global->PRODUCT_SHOW_WHEN_CREATE)
{
print '<tr><td colspan="3">'; print '<tr><td colspan="3">';
if ($conf->produit->enabled || $conf->service->enabled) if ($conf->produit->enabled || $conf->service->enabled)
{ {
@ -323,6 +326,7 @@ if ($conf->expedition->enabled)
print '&nbsp;'; print '&nbsp;';
} }
print '</td></tr>'; print '</td></tr>';
}
print '</table>'; print '</table>';
print '<br>'; print '<br>';

View File

@ -821,6 +821,8 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer)
print '<tr><td>'.$langs->trans('TotalTTC').'</td><td colspan="2">'.price($obj->total).'</td></tr>'; print '<tr><td>'.$langs->trans('TotalTTC').'</td><td colspan="2">'.price($obj->total).'</td></tr>';
} }
else else
{
if ($conf->global->PRODUCT_SHOW_WHEN_CREATE)
{ {
/* /*
* Services/produits prédéfinis * Services/produits prédéfinis
@ -850,6 +852,7 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer)
print '</table>'; print '</table>';
print '</td></tr>'; print '</td></tr>';
} }
}
/* /*
* *

View File

@ -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');