diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index 506a4523b7a..7c34498e6b4 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -681,9 +681,9 @@ if ($action == 'create') dol_fiche_head(); print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; // Other attributes $parameters=array(); @@ -697,7 +697,7 @@ if ($action == 'create') print '

'; print '
'.$langs->trans("MailTitle").'
'.$langs->trans("MailFrom").'
'.$langs->trans("MailErrorsTo").'
'.$langs->trans("MailTitle").'
'.$langs->trans("MailFrom").'
'.$langs->trans("MailErrorsTo").'
'; - print ''; + print ''; print ''; diff --git a/htdocs/comm/remise.php b/htdocs/comm/remise.php index 4ea377a4487..82269434638 100644 --- a/htdocs/comm/remise.php +++ b/htdocs/comm/remise.php @@ -116,7 +116,7 @@ if ($socid > 0) print '
'; print '
'.$langs->trans("MailTopic").'
'.$langs->trans("MailTopic").'
'.$langs->trans("BackgroundColorByDefault").''; print $htmlother->selectColor($_POST['bgcolor'],'bgcolor','new_mailing',0); print '
'; - // Remise + // Discount print '"; @@ -127,13 +127,13 @@ if ($socid > 0) print '
'; print $langs->trans("CustomerRelativeDiscount").''.price2num($object->remise_percent)."%
'; - // Nouvelle valeur + // New value print ''; + print $langs->trans("NewValue").''; // Motif/Note print ''; + print $langs->trans("NoteReason").''; print "
'; - print $langs->trans("NewValue").'%
%
'; - print $langs->trans("NoteReason").'
"; diff --git a/htdocs/don/class/paymentdonation.class.php b/htdocs/don/class/paymentdonation.class.php index 9655f454ed5..9d478c4d7f5 100644 --- a/htdocs/don/class/paymentdonation.class.php +++ b/htdocs/don/class/paymentdonation.class.php @@ -24,33 +24,34 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; -/** \class PaymentDonation - * \brief Class to manage payments of donations +/** + * Class to manage payments of donations */ class PaymentDonation extends CommonObject { public $element='payment_donation'; //!< Id that identify managed objects public $table_element='payment_donation'; //!< Name of table without prefix where object is stored + public $picto = 'payment'; + + public $rowid; - var $rowid; - - var $fk_donation; - var $datec=''; - var $tms=''; - var $datep=''; - var $amount; // Total amount of payment - var $amounts=array(); // Array of amounts - var $typepayment; - var $num_payment; - var $fk_bank; - var $fk_user_creat; - var $fk_user_modif; + public $fk_donation; + public $datec=''; + public $tms=''; + public $datep=''; + public $amount; // Total amount of payment + public $amounts=array(); // Array of amounts + public $typepayment; + public $num_payment; + public $fk_bank; + public $fk_user_creat; + public $fk_user_modif; /** * @deprecated * @see amount, amounts */ - var $total; + public $total; /** * Constructor @@ -432,6 +433,32 @@ class PaymentDonation extends CommonObject } + /** + * Retourne le libelle du statut d'un don (brouillon, validee, abandonnee, payee) + * + * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long + * @return string Libelle + */ + function getLibStatut($mode=0) + { + return ''; + } + + /** + * Renvoi le libelle d'un statut donne + * + * @param int $statut Id statut + * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto + * @return string Libelle du statut + */ + function LibStatut($statut,$mode=0) + { + global $langs; + + return ''; + } + + /** * Initialise an instance with random values. * Used to build previews or test instances. diff --git a/htdocs/don/payment/card.php b/htdocs/don/payment/card.php index fc0b4ae0c78..d3a9e7eb198 100644 --- a/htdocs/don/payment/card.php +++ b/htdocs/don/payment/card.php @@ -40,10 +40,10 @@ if ($user->societe_id) $socid=$user->societe_id; // TODO Add rule to restrict access payment //$result = restrictedArea($user, 'facture', $id,''); -$payment = new PaymentDonation($db); +$object = new PaymentDonation($db); if ($id > 0) { - $result=$payment->fetch($id); + $result=$object->fetch($id); if (! $result) dol_print_error($db,'Failed to get payment id '.$id); } @@ -57,7 +57,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->don->supp { $db->begin(); - $result = $payment->delete($user); + $result = $object->delete($user); if ($result > 0) { $db->commit(); @@ -66,7 +66,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->don->supp } else { - setEventMessages($payment->error, $payment->errors, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); } } @@ -76,7 +76,7 @@ if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->don->cree { $db->begin(); - $result=$payment->valide(); + $result=$object->valide(); if ($result > 0) { @@ -99,12 +99,12 @@ if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->don->cree } } - header('Location: card.php?id='.$payment->id); + header('Location: card.php?id='.$object->id); exit; } else { - setEventMessages($payment->error, $payment->errors, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); } } @@ -133,7 +133,7 @@ dol_fiche_head($head, $hselected, $langs->trans("DonationPayment"), 0, 'payment' */ if ($action == 'delete') { - print $form->formconfirm('card.php?id='.$payment->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2); + print $form->formconfirm('card.php?id='.$object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2); } @@ -142,46 +142,51 @@ if ($action == 'delete') */ if ($action == 'valide') { - $facid = $_GET['facid']; - print $form->formconfirm('card.php?id='.$payment->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2); + $facid = GETPOST('facid','int'); + print $form->formconfirm('card.php?id='.$object->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2); } +dol_banner_tab($object,'id','',1,'rowid','id'); + +print '
'; + print ''; // Ref -print ''; +/*print ''; +*/ // Date -print ''; +print ''; // Mode -print ''; +print ''; // Number -print ''; +print ''; // Amount -print ''; +print ''; // Note -print ''; +print ''; // Bank account if (! empty($conf->banque->enabled)) { - if ($payment->bank_account) + if ($object->bank_account) { $bankline=new AccountLine($db); - $bankline->fetch($payment->bank_line); + $bankline->fetch($object->bank_line); print ''; print ''; - print ''; print ''; @@ -269,7 +274,7 @@ print '
'; /* if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) { - if ($user->societe_id == 0 && $payment->statut == 0 && $_GET['action'] == '') + if ($user->societe_id == 0 && $object->statut == 0 && $_GET['action'] == '') { if ($user->rights->facture->paiement) {
'.$langs->trans('Ref').'
'; -print $form->showrefnav($payment,'id','',1,'rowid','id'); +print $form->showrefnav($object,'id','',1,'rowid','id'); print '
'.$langs->trans('Date').''.dol_print_date($payment->datep,'day').'
'.$langs->trans('Date').''.dol_print_date($object->datep,'day').'
'.$langs->trans('Mode').''.$langs->trans("PaymentType".$payment->type_code).'
'.$langs->trans('Mode').''.$langs->trans("PaymentType".$object->type_code).'
'.$langs->trans('Number').''.$payment->num_payment.'
'.$langs->trans('Number').''.$object->num_payment.'
'.$langs->trans('Amount').''.price($payment->amount, 0, $outputlangs, 1, -1, -1, $conf->currency).'
'.$langs->trans('Amount').''.price($object->amount, 0, $outputlangs, 1, -1, -1, $conf->currency).'
'.$langs->trans('Note').''.nl2br($payment->note).'
'.$langs->trans('Note').''.nl2br($object->note).'
'.$langs->trans('BankTransactionLine').''; + print ''; print $bankline->getNomUrl(1,0,'showall'); print '