From bd63b84f8e2378c37553de2756e3b9a7de3ed704 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 Jul 2020 23:18:19 +0200 Subject: [PATCH] Fix label of social contribution and button date --- htdocs/compta/paiement_charge.php | 5 +++-- htdocs/compta/sociales/card.php | 2 ++ htdocs/core/lib/tax.lib.php | 2 +- htdocs/langs/en_US/compta.lang | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php index 9c5ceea22bf..298866a2020 100644 --- a/htdocs/compta/paiement_charge.php +++ b/htdocs/compta/paiement_charge.php @@ -41,6 +41,8 @@ if ($user->socid > 0) $socid = $user->socid; } +$charge = new ChargeSociales($db); + /* * Actions @@ -161,7 +163,6 @@ $form = new Form($db); // Formulaire de creation d'un paiement de charge if ($action == 'create') { - $charge = new ChargeSociales($db); $charge->fetch($chid); $charge->accountid = $charge->fk_account ? $charge->fk_account : $charge->accountid; $charge->paiementtype = $charge->mode_reglement_id ? $charge->mode_reglement_id : $charge->paiementtype; @@ -223,7 +224,7 @@ if ($action == 'create') print ''.$langs->trans("Date").''; $datepaye = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); $datepayment = empty($conf->global->MAIN_AUTOFILL_DATE) ? (empty($_POST["remonth"]) ?-1 : $datepaye) : 0; - print $form->selectDate($datepayment, '', '', '', '', "add_payment", 1, 1); + print $form->selectDate($datepayment, '', '', '', 0, "add_payment", 1, 1, 0, '', '', $charge->date_ech, '', 1, $langs->trans("DateOfSocialContribution")); print ""; print ''; diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index f9d5a90d543..bcdfe1f5238 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -481,6 +481,8 @@ if ($id > 0) } $morehtmlref .= ''; + $morehtmlright = ''; + $linkback = ''.$langs->trans("BackToList").''; $object->totalpaye = $totalpaye; // To give a chance to dol_banner_tab to use already paid amount to show correct status diff --git a/htdocs/core/lib/tax.lib.php b/htdocs/core/lib/tax.lib.php index 798fa568cb2..d56d2260afc 100644 --- a/htdocs/core/lib/tax.lib.php +++ b/htdocs/core/lib/tax.lib.php @@ -42,7 +42,7 @@ function tax_prepare_head(ChargeSociales $object) $head = array(); $head[$h][0] = DOL_URL_ROOT.'/compta/sociales/card.php?id='.$object->id; - $head[$h][1] = $langs->trans('Card'); + $head[$h][1] = $langs->trans('SocialContribution'); $head[$h][2] = 'card'; $h++; diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang index 8a8c837ac87..8f4f058bb87 100644 --- a/htdocs/langs/en_US/compta.lang +++ b/htdocs/langs/en_US/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Special expenses