24 require
'../../main.inc.php';
25 require_once DOL_DOCUMENT_ROOT.
'/compta/sociales/class/chargesociales.class.php';
26 require_once DOL_DOCUMENT_ROOT.
'/core/lib/tax.lib.php';
27 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
28 if (!empty($conf->projet->enabled))
30 include_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
31 include_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
35 $langs->loadLangs(array(
'compta',
'bills'));
38 $action =
GETPOST(
'action',
'aZ09');
41 $socid =
GETPOST(
'socid',
'int');
42 if ($user->socid) $socid = $user->socid;
43 $result =
restrictedArea($user,
'tax', $id,
'chargesociales',
'charges');
52 if ($action ==
'setlib' && $user->rights->tax->charges->creer)
55 $result = $object->setValueFrom(
'libelle',
GETPOST(
'lib'),
'',
'',
'text',
'', $user,
'TAX_MODIFY');
65 $form =
new Form($db);
67 if (!empty($conf->projet->enabled)) { $formproject =
new FormProjets($db); }
69 $title = $langs->trans(
"SocialContribution").
' - '.$langs->trans(
"Info");
70 $help_url =
'EN:Module_Taxes_and_social_contributions|FR:Module Taxes et dividendes|ES:Módulo Impuestos y cargas sociales (IVA, impuestos)';
80 $morehtmlref =
'<div class="refidno">';
82 $morehtmlref .= $form->editfieldkey(
"Label",
'lib', $object->label, $object, $user->rights->tax->charges->creer,
'string',
'', 0, 1);
83 $morehtmlref .= $form->editfieldval(
"Label",
'lib', $object->label, $object, $user->rights->tax->charges->creer,
'string',
'', null, null,
'', 1);
85 if (!empty($conf->projet->enabled))
87 $langs->load(
"projects");
88 $morehtmlref .=
'<br>'.$langs->trans(
'Project').
' : ';
89 if (!empty($object->fk_project)) {
91 $proj->fetch($object->fk_project);
92 $morehtmlref .=
'<a href="'.DOL_URL_ROOT.
'/projet/card.php?id='.$object->fk_project.
'" title="'.$langs->trans(
'ShowProject').
'">';
93 $morehtmlref .= $proj->ref;
94 $morehtmlref .=
'</a>';
99 $morehtmlref .=
'</div>';
101 $linkback =
'<a href="'.DOL_URL_ROOT.
'/compta/sociales/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
103 $object->totalpaye = $totalpaye;
105 dol_banner_tab($object,
'id', $linkback, 1,
'rowid',
'ref', $morehtmlref,
'', 0,
'', $morehtmlright);
107 print '<div class="fichecenter">';
108 print '<div class="underbanner clearboth"></div>';
112 print '<table width="100%"><tr><td>';
114 print '</td></tr></table>';
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_print_object_info($object, $usetable=0)
Show informations on an object TODO Move this into html.formother.
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
Class to manage projects.
restrictedArea($user, $features, $objectid=0, $tableandshare= '', $feature2= '', $dbt_keyfield= 'fk_soc', $dbt_select= 'rowid', $isdraft=0)
Check permissions of a user to show a page and an object.
tax_prepare_head(ChargeSociales $object)
Prepare array with list of tabs.
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
print
Draft customers invoices.
dol_banner_tab($object, $paramid, $morehtml= '', $shownav=1, $fieldid= 'rowid', $fieldref= 'ref', $morehtmlref= '', $moreparam= '', $nodbprefix=0, $morehtmlleft= '', $morehtmlstatus= '', $onlybanner=0, $morehtmlright= '')
Show tab footer of a card.
Classe permettant la gestion des paiements des charges La tva collectee n'est calculee que sur les fa...