Work on #6958. Only one type of invoice supported for supplier invoices

This commit is contained in:
Laurent Destailleur 2017-06-20 12:58:43 +02:00
parent 4dda771079
commit efe5d79a86

View File

@ -72,27 +72,32 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices
$tooltip.=$langs->trans("GenericMaskCodes5"); $tooltip.=$langs->trans("GenericMaskCodes5");
// Parametrage du prefix // Parametrage du prefix
$texte.= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("InvoiceStandard").'):</td>'; $texte.= '<tr><td>'.$langs->trans("Mask");
//$texte.= ' ('.$langs->trans("InvoiceStandard").')';
$texte.= ':</td>';
$texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskinvoice" value="'.$conf->global->SUPPLIER_INVOICE_TULIP_MASK.'">',$tooltip,1,1).'</td>'; $texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskinvoice" value="'.$conf->global->SUPPLIER_INVOICE_TULIP_MASK.'">',$tooltip,1,1).'</td>';
$texte.= '<td align="left" rowspan="2">&nbsp; <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>'; $texte.= '<td align="left" rowspan="2">&nbsp; <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
$texte.= '</tr>'; $texte.= '</tr>';
// Parametrage du prefix des replacement if ($conf->global->MAIN_FEATURE_LEVEL >= 2)
$texte.= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("InvoiceReplacement").'):</td>'; {
$texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskreplacement" value="'.$conf->global->SUPPLIER_REPLACEMENT_TULIP_MASK.'">',$tooltip,1,1).'</td>'; // Parametrage du prefix des replacement
$texte.= '</tr>'; $texte.= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("InvoiceReplacement").'):</td>';
$texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskreplacement" value="'.$conf->global->SUPPLIER_REPLACEMENT_TULIP_MASK.'">',$tooltip,1,1).'</td>';
$texte.= '</tr>';
// Parametrage du prefix des avoirs // Parametrage du prefix des avoirs
$texte.= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("InvoiceAvoir").'):</td>'; $texte.= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("InvoiceAvoir").'):</td>';
$texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskcredit" value="'.$conf->global->SUPPLIER_CREDIT_TULIP_MASK.'">',$tooltip,1,1).'</td>'; $texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskcredit" value="'.$conf->global->SUPPLIER_CREDIT_TULIP_MASK.'">',$tooltip,1,1).'</td>';
$texte.= '</tr>'; $texte.= '</tr>';
// Parametrage du prefix des acomptes // Parametrage du prefix des acomptes
$texte.= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("InvoiceDeposit").'):</td>'; $texte.= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("InvoiceDeposit").'):</td>';
$texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskdeposit" value="'.$conf->global->SUPPLIER_DEPOSIT_TULIP_MASK.'">',$tooltip,1,1).'</td>'; $texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskdeposit" value="'.$conf->global->SUPPLIER_DEPOSIT_TULIP_MASK.'">',$tooltip,1,1).'</td>';
$texte.= '</tr>'; $texte.= '</tr>';
}
$texte.= '</table>'; $texte.= '</table>';
$texte.= '</form>'; $texte.= '</form>';
@ -137,7 +142,7 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices
// Get Mask value // Get Mask value
$mask = ''; $mask = '';
if (is_object($object) && $object->type == 1) if (is_object($object) && $object->type == 1)
{ {
$mask=$conf->global->SUPPLIER_REPLACEMENT_TULIP_MASK; $mask=$conf->global->SUPPLIER_REPLACEMENT_TULIP_MASK;
if (! $mask) if (! $mask)