diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php
index 3816fa6ee58..e917e1e1c71 100644
--- a/htdocs/compta/sociales/card.php
+++ b/htdocs/compta/sociales/card.php
@@ -269,8 +269,9 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->rights->tax->char
$form = new Form($db);
$formsocialcontrib = new FormSocialContrib($db);
+$title = $langs->trans("SocialContribution") . ' - ' . $langs->trans("Card");
$help_url='EN:Module_Taxes_and_social_contributions|FR:Module Taxes et dividendes|ES:Módulo Impuestos y cargas sociales (IVA, impuestos)';
-llxHeader("",$langs->trans("SocialContribution"),$help_url);
+llxHeader("",$title,$help_url);
// Mode creation
diff --git a/htdocs/compta/sociales/document.php b/htdocs/compta/sociales/document.php
index 926e6232581..a6f4bc10daf 100644
--- a/htdocs/compta/sociales/document.php
+++ b/htdocs/compta/sociales/document.php
@@ -75,6 +75,13 @@ $modulepart='tax';
include_once DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php';
+if ($action == 'setlib' && $user->rights->tax->charges->creer)
+{
+ $object->fetch($id);
+ $result = $object->setValueFrom('libelle', GETPOST('lib'), '', '', 'text', '', $user, 'TAX_MODIFY');
+ if ($result < 0)
+ setEventMessages($object->error, $object->errors, 'errors');
+}
/*
* View
@@ -82,8 +89,9 @@ include_once DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php';
$form = new Form($db);
+$title = $langs->trans("SocialContribution") . ' - ' . $langs->trans("Documents");
$help_url='EN:Module_Taxes_and_social_contributions|FR:Module Taxes et dividendes|ES:Módulo Impuestos y cargas sociales (IVA, impuestos)';
-llxHeader("",$langs->trans("SocialContribution"),$help_url);
+llxHeader("",$title,$help_url);
if ($object->id)
{
@@ -93,6 +101,20 @@ if ($object->id)
dol_fiche_head($head, 'documents', $langs->trans("SocialContribution"), 0, 'bill');
+ $morehtmlref='
';
+ // Label of social contribution
+ $morehtmlref.=$form->editfieldkey("Label", 'lib', $object->lib, $object, $user->rights->tax->charges->creer, 'string', '', 0, 1);
+ $morehtmlref.=$form->editfieldval("Label", 'lib', $object->lib, $object, $user->rights->tax->charges->creer, 'string', '', null, null, '', 1);
+ $morehtmlref.='
';
+
+ $linkback = '' . $langs->trans("BackToList") . ' ';
+
+ $object->totalpaye = $totalpaye; // To give a chance to dol_banner_tab to use already paid amount to show correct status
+
+ dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlright);
+
+ print '';
+ print '
';
// Construit liste des fichiers
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
@@ -105,62 +127,15 @@ if ($object->id)
print '
';
- // Ref
- print ''.$langs->trans("Ref").' ';
- print $form->showrefnav($object,'id');
- print " ";
-
- // Label
- if ($action == 'edit')
- {
- print ''.$langs->trans("Label").' ';
- print ' ';
- print ' ';
- }
- else
- {
- print ''.$langs->trans("Label").' '.$object->lib.' ';
- }
-
- // Type
- print "".$langs->trans("Type")." ".$object->type_libelle." ";
-
- // Period end date
- print "".$langs->trans("PeriodEndDate")." ";
- print "";
- if ($action == 'edit')
- {
- print $form->select_date($object->periode, 'period', 0, 0, 0, 'charge', 1);
- }
- else
- {
- print dol_print_date($object->periode,"day");
- }
- print " ";
- print " ";
-
- // Due date
- if ($action == 'edit')
- {
- print ''.$langs->trans("DateDue")." ";
- print $form->select_date($object->date_ech, 'ech', 0, 0, 0, 'charge', 1);
- print " ";
- }
- else {
- print "".$langs->trans("DateDue")." ".dol_print_date($object->date_ech,'day')." ";
- }
-
- // Amount
- print ''.$langs->trans("AmountTTC").' '.price($object->amount,0,$outputlangs,1,-1,-1,$conf->currency).' ';
-
- // Status
- print ''.$langs->trans("Status").' '.$object->getLibStatut(4,$alreadypayed).' ';
-
- print ''.$langs->trans("NbOfAttachedFiles").' '.count($filearray).' ';
+ print ''.$langs->trans("NbOfAttachedFiles").' '.count($filearray).' ';
print ''.$langs->trans("TotalSizeOfAttachedFiles").' '.$totalsize.' '.$langs->trans("bytes").' ';
print '
';
print '
';
+
+ print '
';
+
+ dol_fiche_end();
$modulepart = 'tax';
$permission = $user->rights->tax->charges->creer;
diff --git a/htdocs/compta/sociales/info.php b/htdocs/compta/sociales/info.php
index c41787b7d08..ff905f1ee6c 100644
--- a/htdocs/compta/sociales/info.php
+++ b/htdocs/compta/sociales/info.php
@@ -37,25 +37,52 @@ $socid = GETPOST('socid','int');
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'tax', $id, 'chargesociales','charges');
+/*
+ * Actions
+ */
+
+if ($action == 'setlib' && $user->rights->tax->charges->creer)
+{
+ $object->fetch($id);
+ $result = $object->setValueFrom('libelle', GETPOST('lib'), '', '', 'text', '', $user, 'TAX_MODIFY');
+ if ($result < 0)
+ setEventMessages($object->error, $object->errors, 'errors');
+}
/*
* View
*/
+$title = $langs->trans("SocialContribution") . ' - ' . $langs->trans("Info");
+$help_url = 'EN:Module_Taxes_and_social_contributions|FR:Module Taxes et dividendes|ES:Módulo Impuestos y cargas sociales (IVA, impuestos)';
+llxHeader("",$title,$help_url);
-$help_url='EN:Module_Taxes_and_social_contributions|FR:Module Taxes et dividendes|ES:Módulo Impuestos y cargas sociales (IVA, impuestos)';
-llxHeader("",$langs->trans("SocialContribution"),$help_url);
+$object = new ChargeSociales($db);
+$object->fetch($id);
+$object->info($id);
-$chargesociales = new ChargeSociales($db);
-$chargesociales->fetch($id);
-$chargesociales->info($id);
-
-$head = tax_prepare_head($chargesociales);
+$head = tax_prepare_head($object);
dol_fiche_head($head, 'info', $langs->trans("SocialContribution"), 0, 'bill');
+$morehtmlref='';
+// Label of social contribution
+$morehtmlref.=$form->editfieldkey("Label", 'lib', $object->lib, $object, $user->rights->tax->charges->creer, 'string', '', 0, 1);
+$morehtmlref.=$form->editfieldval("Label", 'lib', $object->lib, $object, $user->rights->tax->charges->creer, 'string', '', null, null, '', 1);
+$morehtmlref.='
';
+
+$linkback = '' . $langs->trans("BackToList") . ' ';
+
+$object->totalpaye = $totalpaye; // To give a chance to dol_banner_tab to use already paid amount to show correct status
+
+dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlright);
+
+print '';
+print '
';
+
+print '
';
print '
';
-dol_print_object_info($chargesociales);
+dol_print_object_info($object);
print '
';
print '
';