Skip to content
Snippets Groups Projects
Commit 80e34c8e authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

New: Add option INVOICE_CAN_NEVER_BE_REMOVED

parent ef6e06bc
No related branches found
No related tags found
No related merge requests found
......@@ -2590,7 +2590,7 @@ class Facture extends CommonInvoice
/**
* Return if an invoice can be deleted
* Rule is:
* If hidden option FACTURE_CAN_BE_REMOVED is on, we can
* If hidden option INVOICE_CAN_ALWAYS_BE_REMOVED is on, we can
* If invoice has a definitive ref, is last, without payment and not dipatched into accountancy -> yes end of rule
* If invoice is draft and ha a temporary ref -> yes
*
......@@ -2600,7 +2600,8 @@ class Facture extends CommonInvoice
{
global $conf;
if (! empty($conf->global->FACTURE_CAN_BE_REMOVED)) return 1;
if (! empty($conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED)) return 1;
if (! empty($conf->global->INVOICE_CAN_NEVER_BE_REMOVED)) return 1;
// on verifie si la facture est en numerotation provisoire
$facref = substr($this->ref, 1, 4);
......
......@@ -356,7 +356,7 @@ td.showDragHandle {
/* ============================================================================== */
div.fiche {
margin-<?php print $left; ?>: <?php print (GETPOST("optioncss") == 'print'?6:((empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT))?(empty($conf->browser->phone)?'20':'4'):'24')); ?>px;
margin-<?php print $left; ?>: <?php print (GETPOST("optioncss") == 'print'?6:((empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT))?((empty($_SESSION['dol_hide_leftmenu']) && ! GETPOST('dol_hide_leftmenu')) ?'20':'4'):'24')); ?>px;
margin-<?php print $right; ?>: <?php print (GETPOST("optioncss") == 'print'?8:(empty($conf->browser->phone)?'12':'6')); ?>px;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment