From 5a6ad1ef5f408fb808d62b485f4d8f1a49680d03 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 6 May 2014 23:19:48 +0200 Subject: [PATCH] Fix: [ bug #1362 ] Note is not saved Fix: tr/td balance. --- ChangeLog | 2 ++ htdocs/compta/paiement_charge.php | 53 ++++++++++++++---------------- htdocs/compta/sociales/charges.php | 6 ++-- 3 files changed, 30 insertions(+), 31 deletions(-) diff --git a/ChangeLog b/ChangeLog index dae48dadc43..319162f5a11 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17,6 +17,8 @@ Fix: Suppliers invoice mask fails using {tttt} in numbering. Fix: pdf template name for typhon was not correctly et when enabling module. Fix: Navigation on notes for shipments was not working. Fix: [ bug #1353 ] Email notifications, wrong URL. +Fix: [ bug #1362 ] Note is not saved. +Fix: tr/td balance. ***** ChangeLog for 3.5.2 compared to 3.5.1 ***** Fix: Can't add user for a task. diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php index 0b2cc3ea709..637c426d7c9 100644 --- a/htdocs/compta/paiement_charge.php +++ b/htdocs/compta/paiement_charge.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2004-2014 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,7 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $langs->load("bills"); -$chid=isset($_GET["id"])?$_GET["id"]:$_POST["id"]; +$chid=GETPOST("id"); +$action=GETPOST('action'); $amounts = array(); // Security check @@ -43,7 +44,7 @@ if ($user->societe_id > 0) * Actions */ -if ($_POST["action"] == 'add_payment') +if ($action == 'add_payment') { $error=0; @@ -171,7 +172,8 @@ if ($_GET["action"] == 'create') print '
'; print ''; - print ''; + print ''; + print ''; print ''; print ''; @@ -184,7 +186,6 @@ if ($_GET["action"] == 'create') print '\n"; print '\n"; print '\n"; - print ''; $sql = "SELECT sum(p.amount) as total"; @@ -198,43 +199,50 @@ if ($_GET["action"] == 'create') $db->free(); } print ''; - print "'; + print "'; - print "'; + print ''; - print ""; + print "'; - print '"; - print ''; + print ''; - print '\n"; - - print ''; + print ''; print ''; print ''; - print ''; print '\n"; + print ''."\n"; + + print ''; + print ''; + print ''; + print ''; + + print '
'.$langs->trans("Period")."".dol_print_date($charge->periode,'day')."
'.$langs->trans("Label").''.$charge->lib."
'.$langs->trans("DateDue")."".dol_print_date($charge->date_ech,'day')."
'.$langs->trans("AmountTTC")."".price($charge->amount).' '.$langs->trans("Currency".$conf->currency).'
'.$langs->trans("AlreadyPaid").''.price($sumpaid).' '.$langs->trans("Currency".$conf->currency).'
".$langs->trans("RemainderToPay")."".price($total - $sumpaid).' '.$langs->trans("Currency".$conf->currency).'
".$langs->trans("RemainderToPay").''.price($total - $sumpaid).' '.$langs->trans("Currency".$conf->currency).'
".$langs->trans("Payment").'
".$langs->trans("Payment").'
'.$langs->trans("Date").''; + 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; $form->select_date($datepayment,'','','','',"add_payment",1,1); print "'.$langs->trans("Comments").'
'.$langs->trans("PaymentMode").''; + print '
'.$langs->trans("PaymentMode").''; $form->select_types_paiements(isset($_POST["paiementtype"])?$_POST["paiementtype"]:$charge->paiementtype, "paiementtype"); print "
'.$langs->trans('AccountToDebit').''; + print ''; $form->select_comptes(isset($_POST["accountid"])?$_POST["accountid"]:$charge->accountid, "accountid", 0, '',1); // Show opend bank account list print '
'.$langs->trans('Numero'); print ' ('.$langs->trans("ChequeOrTransferNumber").')'; - print "
'.$langs->trans("Comments").'
'; + + print '
'; /* * Autres charges impayees */ $num = 1; $i = 0; - print ''; - print ''; + print '
'; print ''; //print ''; print ''; @@ -303,17 +311,6 @@ if ($_GET["action"] == 'create') print ''; print "\n"; } - print "
'.$langs->trans("SocialContribution").''.$langs->trans("DateDue").' 
\n"; - // } - // $db->free(); - // } - // else - // { - // print $sql ."
".$db->error(); - // } - /* - * - */ print ""; diff --git a/htdocs/compta/sociales/charges.php b/htdocs/compta/sociales/charges.php index 753a4292fb9..0b938510365 100644 --- a/htdocs/compta/sociales/charges.php +++ b/htdocs/compta/sociales/charges.php @@ -256,7 +256,7 @@ if ($id > 0) $head=tax_prepare_head($object); - print dol_get_fiche_head($head, 'card', $langs->trans("SocialContribution"),0,'bill'); + dol_fiche_head($head, 'card', $langs->trans("SocialContribution"),0,'bill'); // Confirmation de la suppression de la charge if ($action == 'paid') @@ -367,7 +367,7 @@ if ($id > 0) print ""; - // Period end date + // Period end date print "".$langs->trans("PeriodEndDate").""; print ""; if ($action == 'edit') @@ -410,7 +410,7 @@ if ($id > 0) if ($action == 'edit') print "
\n"; - print ''; + dol_fiche_end(); /*