New: Add option INVOICE_CAN_NEVER_BE_REMOVED
This commit is contained in:
parent
ef6e06bcaa
commit
80e34c8e1c
@ -2590,7 +2590,7 @@ class Facture extends CommonInvoice
|
|||||||
/**
|
/**
|
||||||
* Return if an invoice can be deleted
|
* Return if an invoice can be deleted
|
||||||
* Rule is:
|
* 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 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
|
* If invoice is draft and ha a temporary ref -> yes
|
||||||
*
|
*
|
||||||
@ -2600,7 +2600,8 @@ class Facture extends CommonInvoice
|
|||||||
{
|
{
|
||||||
global $conf;
|
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
|
// on verifie si la facture est en numerotation provisoire
|
||||||
$facref = substr($this->ref, 1, 4);
|
$facref = substr($this->ref, 1, 4);
|
||||||
|
|||||||
@ -356,7 +356,7 @@ td.showDragHandle {
|
|||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
|
|
||||||
div.fiche {
|
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;
|
margin-<?php print $right; ?>: <?php print (GETPOST("optioncss") == 'print'?8:(empty($conf->browser->phone)?'12':'6')); ?>px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user