33require
'../main.inc.php';
36require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
37require_once DOL_DOCUMENT_ROOT.
'/core/lib/invoice.lib.php';
38require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
39require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formsetup.class.php';
50$langs->loadLangs(array(
'admin',
'errors',
'other',
'bills'));
53$hookmanager->initHooks(array(
'situationinvoicesetup',
'globalsetup'));
60$action =
GETPOST(
'action',
'aZ09');
61$backtopage =
GETPOST(
'backtopage',
'alpha');
63$value =
GETPOST(
'value',
'alpha');
64$label =
GETPOST(
'label',
'alpha');
65$modulepart =
GETPOST(
'modulepart',
'aZ09');
67$scandir =
GETPOST(
'scan_dir',
'alpha');
75$formSetup->newItem(
'INVOICE_USE_SITUATION')
77 ->nameText = $langs->trans(
'UseSituationInvoices');
79$item = $formSetup->newItem(
'INVOICE_USE_SITUATION_CREDIT_NOTE')
81 ->nameText = $langs->trans(
'UseSituationInvoicesCreditNote');
88$item = $formSetup->newItem(
'INVOICE_USE_RETAINED_WARRANTY');
89$item->nameText = $langs->trans(
'AllowedInvoiceForRetainedWarranty');
90$arrayAvailableType = array(
94$item->setAsSelect($arrayAvailableType);
99$formSetup->newItem(
'INVOICE_RETAINED_WARRANTY_LIMITED_TO_FINAL_SITUATION')
101 ->nameText = $langs->trans(
'RetainedWarrantyOnlyForSituationFinal');
104$item = $formSetup->newItem(
'INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_PERCENT');
105$item->nameText = $langs->trans(
'RetainedWarrantyDefaultPercent');
106$item->fieldAttr = array(
115$item = $formSetup->newItem(
'INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID');
116$item->nameText = $langs->trans(
'PaymentConditionsShortRetainedWarranty');
117$form->load_cache_conditions_paiements();
118if (
getDolGlobalString(
'INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID') && isset($form->cache_conditions_paiements[
getDolGlobalString(
'INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID')][
'label'])) {
119 $item->fieldOutputOverride = $form->cache_conditions_paiements[
getDolGlobalString(
'INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID')][
'label'];
121$item->fieldInputOverride = $form->getSelectConditionsPaiements(
$conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID,
'INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID', -1, 1);
128include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
136$dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
138$help_url =
'EN:Invoice_Configuration|FR:Configuration_module_facture|ES:ConfiguracionFactura';
140llxHeader(
"", $langs->trans(
"BillsSetup"), $help_url,
'', 0, 0,
'',
'',
'',
'mod-admin page-invoice_situation');
143$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
144print
load_fiche_titre($langs->trans(
"BillsSetup"), $linkback,
'title_setup');
147print
dol_get_fiche_head($head,
'situation', $langs->trans(
"InvoiceSituation"), -1,
'invoice');
150print
'<span class="opacitymedium">'.$langs->trans(
"InvoiceFirstSituationDesc").
'</span><br><br>';
157if ($action ==
'edit') {
158 print $formSetup->generateOutput(
true);
160 print $formSetup->generateOutput();
163if (count($formSetup->items) > 0) {
164 if ($action !=
'edit') {
165 print
'<div class="tabsAction">';
166 print
'<a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?action=edit&token='.
newToken().
'">'.$langs->trans(
"Modify").
'</a>';
170 print
'<br>'.$langs->trans(
"NothingToSetup");
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.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
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.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.