32require
'../main.inc.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
34if (isModEnabled(
'accounting')) {
35 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formaccounting.class.php';
47$langs->loadLangs(array(
'admin',
'objects',
'companies',
'products'));
53$action =
GETPOST(
'action',
'aZ09');
80if ($action ==
'update') {
95 $valuesellproduct =
'invoice';
96 $valuebuyproduct =
'invoice';
97 $valuesellservice =
'payment';
98 $valuebuyservice =
'payment';
101 $valuesellproduct =
'invoice';
102 $valuebuyproduct =
'invoice';
103 $valuesellservice =
'invoice';
104 $valuebuyservice =
'invoice';
107 $valuesellproduct =
'payment';
108 $valuebuyproduct =
'payment';
109 $valuesellservice =
'payment';
110 $valuebuyservice =
'payment';
113 $valuesellproduct =
null;
114 $valuebuyproduct =
null;
115 $valuesellservice =
null;
116 $valuebuyservice =
null;
150} elseif (preg_match(
'/^(set|del)_?([A-Z_]+)$/', $action, $reg)) {
162llxHeader(
'', $langs->trans(
"TaxSetup"),
'',
'', 0, 0,
'',
'',
'',
'mod-admin page-taxes');
164$form =
new Form($db);
165if (isModEnabled(
'accounting')) {
169$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
174if (empty($mysoc->tva_assuj)) {
175 print $langs->trans(
"YourCompanyDoesNotUseVAT").
'<br>';
177 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="post">';
178 print
'<input type="hidden" name="token" value="'.newToken().
'">';
179 print
'<input type="hidden" name="action" value="update">';
181 print
'<div class="div-table-responsive-no-min">';
182 print
'<table class="noborder centpercent">';
183 print
'<tr class="liste_titre"><td class="titlefield">'.$langs->trans(
"Parameters").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>';
185 print
'<tr class="oddeven"><td><label for="intra_vat">'.$langs->trans(
"VATIntra").
'</label></td><td>';
186 print
'<input name="tva" id="intra_vat" class="minwidth200" value="'.getDolGlobalString(
'MAIN_INFO_TVAINTRA').
'">';
189 print
'<tr class="oddeven"><td><label for="activate_MAIN_INFO_VAT_RETURN">'.$langs->trans(
"VATPaymentFrequency").
'</label></td>';
190 if (!
$conf->use_javascript_ajax) {
191 print
'<td class="nowrap right">';
192 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
195 print
'<td width="120">';
197 '0' => $langs->trans(
""),
198 '1' => $langs->trans(
"Monthly"),
199 '2' => $langs->trans(
"Quarterly"),
200 '3' => $langs->trans(
"Annual"),
202 print $form->selectarray(
"MAIN_INFO_VAT_RETURN", $listval,
getDolGlobalString(
'MAIN_INFO_VAT_RETURN'));
207 print
'<tr class="oddeven"><td><label for="deadline_day_vat">'.$langs->trans(
"DeadlineDayVATSubmission").
'</label></td><td>';
208 print
'<input placeholder="'.$langs->trans(
"Example").
':21" name="deadline_day_vat" id="deadline_day_vat" class="minwidth200" value="'.(
getDolGlobalString(
'MAIN_INFO_TVA_DAY_DEADLINE_SUBMISSION') ?
$conf->global->MAIN_INFO_TVA_DAY_DEADLINE_SUBMISSION :
'').
'">';
211 $key =
'CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT';
212 print
'<tr><td>'.$langs->trans($key).
'</td><td>'.ajax_constantonoff($key).
'</td></tr>';
220 print
'<div class="div-table-responsive-no-min">';
221 print
'<table class="noborder centpercent">';
224 print
'<tr class="liste_titre">';
225 print
'<td class="titlefield">'.$langs->trans(
'OptionVatMode').
'</td><td>'.$langs->trans(
'Description').
'</td>';
228 print
'<tr class="oddeven"><td><input type="radio" id="tax_mode0" name="tax_mode" value="0"'.(empty($tax_mode) ?
' checked' :
'').
'> <label for="tax_mode0">'.$langs->trans(
'OptionVATDefault').
'</label></td>';
229 print
'<td>'.nl2br($langs->trans(
'OptionVatDefaultDesc'));
230 print
"</td></tr>\n";
232 print
'<tr class="oddeven"><td><input type="radio" id="tax_mode1" name="tax_mode" value="1"'.($tax_mode == 1 ?
' checked' :
'').
'> <label for="tax_mode1">'.$langs->trans(
'OptionVATDebitOption').
'</label></td>';
233 print
'<td>'.nl2br($langs->trans(
'OptionVatDebitOptionDesc')).
"</td></tr>\n";
236 print
'<tr class="oddeven"><td><input type="radio" id="tax_mode2" name="tax_mode" value="2"'.($tax_mode == 2 ?
' checked' :
'').
'> <label for="tax_mode2">'.$langs->trans(
'OptionPaymentForProductAndServices').
'</label></td>';
237 print
'<td>'.nl2br($langs->trans(
'OptionPaymentForProductAndServicesDesc')).
"</td></tr>\n";
244 print
load_fiche_titre(
'',
'',
'', 0,
'',
'',
'-> '.$langs->trans(
"SummaryOfVatExigibilityUsedByDefault"));
248 print
'<div class="div-table-responsive-no-min">';
249 print
'<table class="noborder centpercent">';
250 print
'<tr class="oddeven"><td class="titlefield"> </td><td>'.$langs->trans(
"Buy").
'</td><td>'.$langs->trans(
"Sell").
'</td></tr>';
253 print
'<tr class="oddeven"><td>'.$langs->trans(
"Product").
'</td>';
256 print $langs->trans(
"OnPayment");
257 print
' ('.$langs->trans(
"SupposedToBePaymentDate").
')';
259 print $langs->trans(
"OnDelivery");
260 print
' ('.$langs->trans(
"SupposedToBeInvoiceDate").
')';
265 print $langs->trans(
"OnPayment");
266 print
' ('.$langs->trans(
"SupposedToBePaymentDate").
')';
268 print $langs->trans(
"OnDelivery");
269 print
' ('.$langs->trans(
"SupposedToBeInvoiceDate").
')';
274 print
'<tr class="oddeven"><td>'.$langs->trans(
"Services").
'</td>';
277 print $langs->trans(
"OnPayment");
278 print
' ('.$langs->trans(
"SupposedToBePaymentDate").
')';
280 print $langs->trans(
"OnInvoice");
281 print
' ('.$langs->trans(
"InvoiceDateUsed").
')';
286 print $langs->trans(
"OnPayment");
287 print
' ('.$langs->trans(
"SupposedToBePaymentDate").
')';
289 print $langs->trans(
"OnInvoice");
290 print
' ('.$langs->trans(
"InvoiceDateUsed").
')';
301print
'<div class="center">';
302print
'<input type="submit" class="button button-edit" name="Button"value="'.$langs->trans(
"Modify").
'">';
311if (isModEnabled(
'accounting')) {
312 $langs->load(
"accountancy");
313 print
'<br><br><span class="opacitymedium">'.$langs->trans(
"AccountingAccountForSalesTaxAreDefinedInto", $langs->transnoentitiesnoconv(
"MenuAccountancy"), $langs->transnoentitiesnoconv(
"Setup")).
'</span>';
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
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.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
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.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
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.