New: Some changes to support the type of line in entities.
This commit is contained in:
parent
681a787fea
commit
861899f272
@ -35,7 +35,7 @@ if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT.'/project.class.php')
|
|||||||
|
|
||||||
|
|
||||||
if (!$user->rights->fournisseur->facture->lire)
|
if (!$user->rights->fournisseur->facture->lire)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$langs->load('bills');
|
$langs->load('bills');
|
||||||
$langs->load('suppliers');
|
$langs->load('suppliers');
|
||||||
@ -356,8 +356,8 @@ if ($_POST['action'] == 'classin')
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxHeader('','','');
|
llxHeader('','','');
|
||||||
|
|
||||||
@ -915,9 +915,16 @@ else
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Form to add new line
|
||||||
|
*/
|
||||||
|
|
||||||
if ($fac->statut == 0 && $_GET['action'] != 'mod_ligne')
|
if ($fac->statut == 0 && $_GET['action'] != 'mod_ligne')
|
||||||
{
|
{
|
||||||
print '<tr class="liste_titre"><td>'.$langs->trans('Label').'</td>';
|
print '<tr class="liste_titre">';
|
||||||
|
print '<td>';
|
||||||
|
print '<a name="add"></a>'; // ancre
|
||||||
|
print $langs->trans('AddNewLine').' - '.$langs->trans("FreeZone").'</td>';
|
||||||
print '<td align="right">'.$langs->trans('VAT').'</td>';
|
print '<td align="right">'.$langs->trans('VAT').'</td>';
|
||||||
print '<td align="right">'.$langs->trans('PriceUHT').'</td>';
|
print '<td align="right">'.$langs->trans('PriceUHT').'</td>';
|
||||||
print '<td align="right">'.$langs->trans('PriceUTTC').'</td>';
|
print '<td align="right">'.$langs->trans('PriceUTTC').'</td>';
|
||||||
@ -928,17 +935,35 @@ else
|
|||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
/* Nouvelle ligne */
|
// Add free products/services form
|
||||||
$var=!$var;
|
|
||||||
print '<form action="fiche.php?facid='.$fac->id.'&action=add_ligne" method="post">';
|
print '<form action="fiche.php?facid='.$fac->id.'&action=add_ligne" method="post">';
|
||||||
print '<input type="hidden" name="facid" value="'.$fac->id.'">';
|
print '<input type="hidden" name="facid" value="'.$fac->id.'">';
|
||||||
print '<input type="hidden" name="socid" value="'.$societe->id.'">';
|
print '<input type="hidden" name="socid" value="'.$societe->id.'">';
|
||||||
|
|
||||||
|
$var=true;
|
||||||
print '<tr '.$bc[$var].'>';
|
print '<tr '.$bc[$var].'>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print '<textarea class="flat" cols="70" rows="'.ROWS_2.'" name="label"></textarea>';
|
|
||||||
|
print $html->select_type_of_lines(-1,'type',1);
|
||||||
|
if ($conf->produit->enabled && $conf->service->enabled) print '<br>';
|
||||||
|
|
||||||
|
// Editor wysiwyg
|
||||||
|
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS)
|
||||||
|
{
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||||
|
$doleditor=new DolEditor('label','',100,'dolibarr_details');
|
||||||
|
$doleditor->Create();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<textarea class="flat" cols="70" name="label" rows="'.ROWS_2.'"></textarea>';
|
||||||
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right">';
|
print '<td align="center">';
|
||||||
$html->select_tva('tauxtva','',$societe,$mysoc);
|
//if($mysoc->tva_assuj == "0")
|
||||||
|
//print '<input type="hidden" name="tva_tx" value="0">0';
|
||||||
|
//else
|
||||||
|
print $html->select_tva('tauxtva',$conf->defaulttx,$societe,$mysoc);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
print '<input size="6" name="amount" type="text">';
|
print '<input size="6" name="amount" type="text">';
|
||||||
@ -957,6 +982,23 @@ else
|
|||||||
// Ajout de produits/services predefinis
|
// Ajout de produits/services predefinis
|
||||||
if ($conf->produit->enabled)
|
if ($conf->produit->enabled)
|
||||||
{
|
{
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
print '<td colspan="4">';
|
||||||
|
print $langs->trans("AddNewLine").' - ';
|
||||||
|
if ($conf->service->enabled)
|
||||||
|
{
|
||||||
|
print $langs->trans('RecordedProductsAndServices');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $langs->trans('RecordedProducts');
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
print '<td align="right">'.$langs->trans('Qty').'</td>';
|
||||||
|
print '<td align="right"> </td>';
|
||||||
|
print '<td colspan="4"> </td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
print '<form name="addligne_predef" action="fiche.php?facid='.$fac->id.'&action=add_ligne" method="post">';
|
print '<form name="addligne_predef" action="fiche.php?facid='.$fac->id.'&action=add_ligne" method="post">';
|
||||||
print '<input type="hidden" name="socid" value="'. $fac->socid .'">';
|
print '<input type="hidden" name="socid" value="'. $fac->socid .'">';
|
||||||
print '<input type="hidden" name="facid" value="'.$fac->id.'">';
|
print '<input type="hidden" name="facid" value="'.$fac->id.'">';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user