34 |
if (!$user->admin) |
if (!$user->admin) |
35 |
accessforbidden(); |
accessforbidden(); |
36 |
|
|
|
|
|
37 |
if ( (isset($_POST["action"]) && $_POST["action"] == 'update') |
if ( (isset($_POST["action"]) && $_POST["action"] == 'update') |
38 |
|| (isset($_POST["action"]) && $_POST["action"] == 'updateedit') ) |
|| (isset($_POST["action"]) && $_POST["action"] == 'updateedit') ) |
39 |
{ |
{ |
49 |
dolibarr_set_const($db, "MAIN_INFO_APE",$_POST["ape"]); |
dolibarr_set_const($db, "MAIN_INFO_APE",$_POST["ape"]); |
50 |
dolibarr_set_const($db, "MAIN_INFO_RCS",$_POST["rcs"]); |
dolibarr_set_const($db, "MAIN_INFO_RCS",$_POST["rcs"]); |
51 |
dolibarr_set_const($db, "MAIN_INFO_TVAINTRA",$_POST["tva"]); |
dolibarr_set_const($db, "MAIN_INFO_TVAINTRA",$_POST["tva"]); |
52 |
|
dolibarr_set_const($db, "FACTURE_TVAOPTION",$_POST["optiontva"]); |
53 |
|
|
54 |
if ($_POST['action'] != 'updateedit') |
if ($_POST['action'] != 'updateedit') |
55 |
{ |
{ |
230 |
|
|
231 |
print '</table>'; |
print '</table>'; |
232 |
|
|
233 |
print '<br><center><input type="submit" value="'.$langs->trans("Save").'"></center>'; |
|
234 |
|
|
235 |
|
/* |
236 |
|
* Options fiscale |
237 |
|
*/ |
238 |
|
print '<br>'; |
239 |
|
print '<table class="noborder" width="100%">'; |
240 |
|
print '<tr class="liste_titre">'; |
241 |
|
print '<td>'.$langs->trans("VATManagement").'</td><td>'.$langs->trans("Description").'</td>'; |
242 |
|
print '<td align="right"> </td>'; |
243 |
|
print "</tr>\n"; |
244 |
|
$var=true; |
245 |
|
|
246 |
|
$var=!$var; |
247 |
|
print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optiontva\" value=\"reel\"".($conf->global->FACTURE_TVAOPTION != "franchise"?" checked":"")."> ".$langs->trans("VATIsUsed")."</label></td>"; |
248 |
|
print '<td colspan="2">'; |
249 |
|
print "<table>"; |
250 |
|
print "<tr><td>".$langs->trans("VATIsUsedDesc")."</td></tr>"; |
251 |
|
print "<td><i>".$langs->trans("Example").': '.$langs->trans("VATIsUsedExampleFR")."</i></td></tr>\n"; |
252 |
|
print "</table>"; |
253 |
|
print "</td></tr>\n"; |
254 |
|
|
255 |
|
/* Je désactive cette option "facturation" car ce statut fiscal n'existe pas. Seul le réel et franchise existe. |
256 |
|
Cette option ne doit donc pas etre en "exclusif" avec l'option fiscale de gestion de tva. Peut etre faut-il |
257 |
|
une option a part qui n'entre pas en conflit avec les choix "assujéti TVA" ou "non". |
258 |
|
$var=!$var; |
259 |
|
print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optiontva\" value=\"facturation\"".($conf->global->FACTURE_TVAOPTION == "facturation"?" checked":"")."> Option facturation</label></td>"; |
260 |
|
print "<td colspan=\"2\">L'option 'facturation' est utilisée par les entreprises qui payent la TVA à facturation (vente de matériel).</td></tr>\n"; |
261 |
|
*/ |
262 |
|
|
263 |
|
$var=!$var; |
264 |
|
print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optiontva\" value=\"franchise\"".($conf->global->FACTURE_TVAOPTION == "franchise"?" checked":"")."> ".$langs->trans("VATIsNotUsed")."</label></td>"; |
265 |
|
print '<td colspan="2">'; |
266 |
|
print "<table>"; |
267 |
|
print "<tr><td>".$langs->trans("VATIsNotUsedDesc")."</td></tr>"; |
268 |
|
print "<td><i>".$langs->trans("Example").': '.$langs->trans("VATIsNotUsedExampleFR")."</i></td></tr>\n"; |
269 |
|
print "</table>"; |
270 |
|
print "</td></tr>\n"; |
271 |
|
|
272 |
|
print "</table>"; |
273 |
|
|
274 |
|
|
275 |
|
|
276 |
|
print '<br><center><input type="submit" class="button" value="'.$langs->trans("Save").'"></center>'; |
277 |
|
print '<br>'; |
278 |
|
|
279 |
print '</form>'; |
print '</form>'; |
280 |
} |
} |
281 |
else |
else |
381 |
$var=!$var; |
$var=!$var; |
382 |
print '<tr '.$bc[$var].'><td>'.$langs->trans("TVAIntra").'</td><td>' . $conf->global->MAIN_INFO_TVAINTRA . '</td></tr>'; |
print '<tr '.$bc[$var].'><td>'.$langs->trans("TVAIntra").'</td><td>' . $conf->global->MAIN_INFO_TVAINTRA . '</td></tr>'; |
383 |
|
|
384 |
print '</table><br>'; |
print '</table>'; |
385 |
|
|
386 |
|
|
387 |
|
/* |
388 |
|
* Options fiscale |
389 |
|
*/ |
390 |
|
print '<br>'; |
391 |
|
print '<table class="noborder" width="100%">'; |
392 |
|
print '<tr class="liste_titre">'; |
393 |
|
print '<td>'.$langs->trans("VATManagement").'</td><td>'.$langs->trans("Description").'</td>'; |
394 |
|
print '<td align="right"> </td>'; |
395 |
|
print "</tr>\n"; |
396 |
|
$var=true; |
397 |
|
|
398 |
|
$var=!$var; |
399 |
|
print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optiontva\" disabled value=\"reel\"".($conf->global->FACTURE_TVAOPTION != "franchise"?" checked":"")."> ".$langs->trans("VATIsUsed")."</label></td>"; |
400 |
|
print '<td colspan="2">'; |
401 |
|
print "<table>"; |
402 |
|
print "<tr><td>".$langs->trans("VATIsUsedDesc")."</td></tr>"; |
403 |
|
print "<td><i>".$langs->trans("Example").': '.$langs->trans("VATIsUsedExampleFR")."</i></td></tr>\n"; |
404 |
|
print "</table>"; |
405 |
|
print "</td></tr>\n"; |
406 |
|
|
407 |
|
/* Je désactive cette option "facturation" car ce statut fiscal n'existe pas. Seul le réel et franchise existe. |
408 |
|
Cette option ne doit donc pas etre en "exclusif" avec l'option fiscale de gestion de tva. Peut etre faut-il |
409 |
|
une option a part qui n'entre pas en conflit avec les choix "assujéti TVA" ou "non". |
410 |
|
$var=!$var; |
411 |
|
print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optiontva\" value=\"facturation\"".($conf->global->FACTURE_TVAOPTION == "facturation"?" checked":"")."> Option facturation</label></td>"; |
412 |
|
print "<td colspan=\"2\">L'option 'facturation' est utilisée par les entreprises qui payent la TVA à facturation (vente de matériel).</td></tr>\n"; |
413 |
|
*/ |
414 |
|
|
415 |
|
$var=!$var; |
416 |
|
print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optiontva\" disabled value=\"franchise\"".($conf->global->FACTURE_TVAOPTION == "franchise"?" checked":"")."> ".$langs->trans("VATIsNotUsed")."</label></td>"; |
417 |
|
print '<td colspan="2">'; |
418 |
|
print "<table>"; |
419 |
|
print "<tr><td>".$langs->trans("VATIsNotUsedDesc")."</td></tr>"; |
420 |
|
print "<td><i>".$langs->trans("Example").': '.$langs->trans("VATIsNotUsedExampleFR")."</i></td></tr>\n"; |
421 |
|
print "</table>"; |
422 |
|
print "</td></tr>\n"; |
423 |
|
|
424 |
|
print "</table>"; |
425 |
|
|
426 |
|
|
427 |
// Boutons d'action |
// Boutons d'action |
428 |
print '<div class="tabsAction">'; |
print '<div class="tabsAction">'; |
429 |
print '<a class="tabAction" href="index.php?action=edit">'.$langs->trans("Edit").'</a>'; |
print '<a class="tabAction" href="index.php?action=edit">'.$langs->trans("Edit").'</a>'; |