33require
'../main.inc.php';
42require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
43require_once DOL_DOCUMENT_ROOT.
'/core/lib/invoice.lib.php';
44require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
45require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formsetup.class.php';
48$langs->loadLangs(array(
'admin',
'errors',
'other',
'bills'));
51$hookmanager->initHooks(array(
'situationinvoicesetup',
'globalsetup'));
58$action =
GETPOST(
'action',
'aZ09');
59$backtopage =
GETPOST(
'backtopage',
'alpha');
61$value =
GETPOST(
'value',
'alpha');
62$label =
GETPOST(
'label',
'alpha');
63$modulepart =
GETPOST(
'modulepart',
'aZ09');
65$scandir =
GETPOST(
'scan_dir',
'alpha');
73$formSetup->newItem(
'INVOICE_USE_SITUATION')
75 ->nameText = $langs->trans(
'UseSituationInvoices');
77$item = $formSetup->newItem(
'INVOICE_USE_SITUATION_CREDIT_NOTE')
79 ->nameText = $langs->trans(
'UseSituationInvoicesCreditNote');
86$item = $formSetup->newItem(
'INVOICE_USE_RETAINED_WARRANTY');
87$item->nameText = $langs->trans(
'AllowedInvoiceForRetainedWarranty');
88$arrayAvailableType = array(
92$item->setAsSelect($arrayAvailableType);
97$formSetup->newItem(
'INVOICE_RETAINED_WARRANTY_LIMITED_TO_FINAL_SITUATION')
99 ->nameText = $langs->trans(
'RetainedWarrantyOnlyForSituationFinal');
102$item = $formSetup->newItem(
'INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_PERCENT');
103$item->nameText = $langs->trans(
'RetainedWarrantyDefaultPercent');
104$item->fieldAttr = array(
109 'class' =>
'width75 right',
114$item = $formSetup->newItem(
'INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID');
115$item->nameText = $langs->trans(
'PaymentConditionsShortRetainedWarranty');
116$form->load_cache_conditions_paiements();
117if (
getDolGlobalString(
'INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID') && isset($form->cache_conditions_paiements[
getDolGlobalString(
'INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID')][
'label'])) {
118 $item->fieldOutputOverride = $form->cache_conditions_paiements[
getDolGlobalString(
'INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID')][
'label'];
120$item->fieldInputOverride = $form->getSelectConditionsPaiements(
getDolGlobalInt(
"INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID"),
'INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID', -1, 1);
127include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
137$dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
139$help_url =
'EN:Invoice_Configuration|FR:Configuration_module_facture|ES:ConfiguracionFactura';
141llxHeader(
"", $langs->trans(
"BillsSetup"), $help_url,
'', 0, 0,
'',
'',
'',
'mod-admin page-invoice_situation');
144$linkback =
'<a href="'.dolBuildUrl(DOL_URL_ROOT.
'/admin/modules.php', [
'restore_lastsearch_values' => 1]).
'">'.
img_picto($langs->trans(
"BackToModuleList"),
'back',
'class="pictofixedwidth"').
'<span class="hideonsmartphone">'.$langs->trans(
"BackToModuleList").
'</span></a>';
146print
load_fiche_titre($langs->trans(
"BillsSetup"), $linkback,
'title_setup');
149print
dol_get_fiche_head($head,
'situation', $langs->trans(
"InvoiceSituation"), -1,
'bill');
152print
'<span class="opacitymedium">'.$langs->trans(
"InvoiceFirstSituationDesc").
'</span><br><br>';
154print $formSetup->generateOutput(
true);
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
const TYPE_STANDARD
Standard invoice.
const TYPE_SITUATION
Situation invoice.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2, $allowothertags=array())
Show picto whatever it's its name (generic function)
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0, $morecssdiv='')
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
invoice_admin_prepare_head()
Return array head with list of tabs to view object information.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.