Fix: Donation payment type don't show in card

This commit is contained in:
aspangaro 2015-07-15 19:54:51 +02:00
parent 05dcb0d1ac
commit 26ae9a6eb7
4 changed files with 10 additions and 10 deletions

View File

@ -19,7 +19,7 @@
/**
* \file htdocs/compta/sociales/charges.php
* \ingroup tax
* \brief Social contribution car page
* \brief Social contribution card page
*/
require '../../main.inc.php';
@ -387,7 +387,7 @@ if ($id > 0)
{
$num = $db->num_rows($resql);
$i = 0; $total = 0;
echo '<table class="nobordernopadding" width="100%">';
print '<table class="nobordernopadding" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("RefPayment").'</td>';
print '<td>'.$langs->trans("Date").'</td>';
@ -488,7 +488,7 @@ if ($id > 0)
/*
* Boutons actions
* Actions buttons
*/
if ($action != 'edit')
{
@ -500,7 +500,7 @@ if ($id > 0)
print "<a class=\"butAction\" href=\"".DOL_URL_ROOT."/compta/sociales/charges.php?id=$object->id&amp;action=edit\">".$langs->trans("Modify")."</a>";
}
// Emettre paiement
// Emit payment
if ($object->paye == 0 && ((price2num($object->amount) < 0 && price2num($resteapayer, 'MT') < 0) || (price2num($object->amount) > 0 && price2num($resteapayer, 'MT') > 0)) && $user->rights->tax->charges->creer)
{
print "<a class=\"butAction\" href=\"".DOL_URL_ROOT."/compta/paiement_charge.php?id=$object->id&amp;action=create\">".$langs->trans("DoPayment")."</a>";

View File

@ -595,8 +595,8 @@ if (! empty($id) && $action != 'edit')
print "<tr ".$bc[$var]."><td>";
print '<a href="'.DOL_URL_ROOT.'/don/payment/card.php?id='.$objp->rowid.'">'.img_object($langs->trans("Payment"),"payment").' '.$objp->rowid.'</a></td>';
print '<td>'.dol_print_date($db->jdate($objp->dp),'day')."</td>\n";
$labeltype=$langs->trans("PaymentType".$object->type_code)!=("PaymentType".$object->type_code)?$langs->trans("PaymentType".$object->type_code):$object->paiement_type;
print "<td>".$labeltype.' '.$object->num_paiement."</td>\n";
$labeltype=$langs->trans("PaymentType".$objp->type_code)!=("PaymentType".$objp->type_code)?$langs->trans("PaymentType".$objp->type_code):$objp->paiement_type;
print "<td>".$labeltype.' '.$objp->num_payment."</td>\n";
print '<td align="right">'.price($objp->amount)."</td><td>&nbsp;".$langs->trans("Currency".$conf->currency)."</td>\n";
print "</tr>";
$totalpaid += $objp->amount;

View File

@ -55,8 +55,8 @@ class Don extends CommonObject
var $email;
var $public;
var $fk_projet;
var $modepaiement;
var $modepaiementid;
var $fk_typepayment;
var $num_payment;
var $note_private;
var $note_public;
var $statut;

View File

@ -90,8 +90,8 @@ class PaymentDonation extends CommonObject
// Clean parameters
if (isset($this->fk_donation)) $this->fk_donation=trim($this->fk_donation);
if (isset($this->amount)) $this->amount=trim($this->amount);
if (isset($this->typepayment)) $this->typepayment=trim($this->typepayment);
if (isset($this->num_payment)) $this->num_payment=trim($this->num_payment);
if (isset($this->fk_typepayment)) $this->fk_typepayment=trim($this->fk_typepayment);
if (isset($this->num_payment)) $this->num_payment=trim($this->num_payment);
if (isset($this->note)) $this->note=trim($this->note);
if (isset($this->fk_bank)) $this->fk_bank=trim($this->fk_bank);
if (isset($this->fk_user_creat)) $this->fk_user_creat=trim($this->fk_user_creat);