diff --git a/htdocs/compta/salaries/class/paymentsalary.class.php b/htdocs/compta/salaries/class/paymentsalary.class.php index 50e12bf4f72..54edd9ec45c 100644 --- a/htdocs/compta/salaries/class/paymentsalary.class.php +++ b/htdocs/compta/salaries/class/paymentsalary.class.php @@ -331,7 +331,7 @@ class PaymentSalary extends CommonObject $sql.= ", amount"; $sql.= ", fk_typepayment"; $sql.= ", num_payment"; - $sql.= ", note"; + if ($this->note) $sql.= ", note"; $sql.= ", label"; $sql.= ", datesp"; $sql.= ", dateep"; @@ -346,7 +346,7 @@ class PaymentSalary extends CommonObject $sql.= ", '".$this->amount."'"; $sql.= ", '".$this->type_payment."'"; $sql.= ", '".$this->num_payment."'"; - $sql.= ", '".$this->db->escape($this->note)."'"; + if ($this->note) $sql.= ", '".$this->db->escape($this->note)."'"; $sql.= ", '".$this->db->escape($this->label)."'"; $sql.= ", '".$this->db->idate($this->datesp)."'"; $sql.= ", '".$this->db->idate($this->dateep)."'"; diff --git a/htdocs/compta/salaries/fiche.php b/htdocs/compta/salaries/fiche.php index d6ffab1012b..1615c297214 100644 --- a/htdocs/compta/salaries/fiche.php +++ b/htdocs/compta/salaries/fiche.php @@ -244,20 +244,19 @@ if ($action == 'create') print ''.$langs->trans("Account").''; $form->select_comptes($_POST["accountid"],"accountid",0,"courant=1",1); // Affiche liste des comptes courant print ''; - + + // Type payment + print ''.$langs->trans("PaymentMode").''; + $form->select_types_paiements(GETPOST("paymenttype"), "paymenttype"); + print "\n"; + print ""; + + // Number + print ''.$langs->trans('Numero'); + print ' ('.$langs->trans("ChequeOrTransferNumber").')'; + print ''."\n"; } - - // TYpe payment - print ''.$langs->trans("PaymentMode").''; - $form->select_types_paiements(GETPOST("paymenttype"), "paymenttype"); - print "\n"; - print ""; - - // Number - print ''.$langs->trans('Numero'); - print ' ('.$langs->trans("ChequeOrTransferNumber").')'; - print ''."\n"; - + // Other attributes $parameters=array('colspan' => ' colspan="1"'); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook diff --git a/htdocs/compta/salaries/index.php b/htdocs/compta/salaries/index.php index f32c1bad951..e6fcfab763c 100644 --- a/htdocs/compta/salaries/index.php +++ b/htdocs/compta/salaries/index.php @@ -69,7 +69,7 @@ if ($result) print "".$langs->trans("Person").""; print "".$langs->trans("Label").""; print ''.$langs->trans("DatePayment").''; - print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"c.libelle","",$paramlist,"",$sortfield,$sortorder); + print ''.$langs->trans("Type").''; print "".$langs->trans("PayedByThisPayment").""; print "\n"; $var=1;