diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index 8cf0b2fbcc4..bc72771e7c1 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -361,7 +361,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $ $paiement = new Paiement($db); $paiement->datepaye = $datecotisation; $paiement->amounts = $amounts; - $paiement->paiementid = dol_getIdFromCode($db,$operation,'paiement'); + $paiement->paiementid = dol_getIdFromCode($db,$operation,'c_paiement'); $paiement->num_paiement = $num_chq; $paiement->note = $label; @@ -720,7 +720,7 @@ if ($rowid) if (code == \'CHQ\') { jQuery(\'.fieldrequireddyn\').addClass(\'fieldrequired\'); - if (jQuery(\'#fieldrequireddyn\').val() == \'\') + if (jQuery(\'#fieldchqemetteur\').val() == \'\') { jQuery(\'#fieldchqemetteur\').val(jQuery(\'#memberlabel\').val()); } diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index f08afd0ae50..b825f1dfed7 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -91,7 +91,7 @@ if ($_POST['action'] == 'add_paiement' || ($_POST['action'] == 'confirm_paiement } // Check parameters - if ($_POST['paiementid'] <= 0) + if (! GETPOST('paiementcode')) { $fiche_erreur_message = '
'.$langs->trans('ErrorFieldRequired',$langs->transnoentities('PaymentMode')).'
'; $error++; @@ -151,7 +151,7 @@ if ($_POST['action'] == 'confirm_paiement' && $_POST['confirm'] == 'yes') $paiement = new Paiement($db); $paiement->datepaye = $datepaye; $paiement->amounts = $amounts; // Tableau de montant - $paiement->paiementid = $_POST['paiementid']; + $paiement->paiementid = dol_getIdFromCode($db,$_POST['paiementcode'],'c_paiement'); $paiement->num_paiement = $_POST['num_paiement']; $paiement->note = $_POST['comment']; @@ -234,13 +234,37 @@ if ($_GET['action'] == 'create' || $_POST['action'] == 'confirm_paiement' || $_P $formquestion[$i++]=array('type' => 'hidden','name' => 'type', 'value' => $facture->type); } + if ($conf->use_javascript_ajax) + { + print "\n".''."\n"; + } + print '
'; print ''; print ''; print ''; print ''; print ''; - + print ''; + print ''; print '\n"; @@ -254,7 +278,7 @@ if ($_GET['action'] == 'create' || $_POST['action'] == 'confirm_paiement' || $_P print ''; print '\n"; print ''; print ''; - print ''; - print ''; + print ''; print '
'.$langs->trans('Company').''.$facture->client->getNomUrl(4)."
'.$langs->trans('Comments').'
'.$langs->trans('PaymentMode').''; - $html->select_types_paiements(empty($_POST['paiementid'])?'':$_POST['paiementid'],'paiementid'); + $html->select_types_paiements(empty($_POST['paiementcode'])?'':$_POST['paiementcode'],'paiementcode','',2); print "'; @@ -280,10 +304,10 @@ if ($_GET['action'] == 'create' || $_POST['action'] == 'confirm_paiement' || $_P print '
'.$langs->trans('CheckTransmitter'); + print '
'.$langs->trans('CheckTransmitter'); print ' ('.$langs->trans("ChequeMaker").')'; print '
'.$langs->trans('Bank'); print ' ('.$langs->trans("ChequeBank").')';