Fix: Error when editing memeber card
This commit is contained in:
parent
27f8a84203
commit
c786173baa
@ -57,9 +57,9 @@ if ($user->rights->adherent->cotisation->creer && $_REQUEST["action"] == 'update
|
||||
if ($result > 0)
|
||||
{
|
||||
$db->begin();
|
||||
|
||||
|
||||
$errmsg='';
|
||||
|
||||
|
||||
if ($subscription->fk_bank)
|
||||
{
|
||||
$accountline=new AccountLine($db);
|
||||
@ -82,7 +82,7 @@ if ($user->rights->adherent->cotisation->creer && $_REQUEST["action"] == 'update
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (! $errmsg)
|
||||
{
|
||||
// Modifie valeures
|
||||
@ -170,13 +170,13 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit')
|
||||
|
||||
$subscription->fetch($rowid);
|
||||
$result=$adh->fetch($subscription->fk_adherent);
|
||||
|
||||
|
||||
/*
|
||||
* Affichage onglets
|
||||
*/
|
||||
$h = 0;
|
||||
$head = array();
|
||||
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/adherents/fiche_subscription.php?rowid='.$subscription->id;
|
||||
$head[$h][1] = $langs->trans("SubscriptionCard");
|
||||
$head[$h][2] = 'general';
|
||||
@ -195,10 +195,10 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit')
|
||||
print "<input type=\"hidden\" name=\"rowid\" value=\"$rowid\">";
|
||||
print "<input type=\"hidden\" name=\"fk_bank\" value=\"".$subscription->fk_bank."\">";
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td class="valeur" colspan="2">'.$subscription->ref.' </td></tr>';
|
||||
|
||||
|
||||
// Member
|
||||
$adh->ref=$adh->fullname;
|
||||
print '<tr>';
|
||||
@ -224,16 +224,23 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit')
|
||||
// Label
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td class="valeur" colspan="2">';
|
||||
print '<input type="text" class="flat" size="60" name="note" value="'.$subscription->note.'"></td></tr>';
|
||||
|
||||
|
||||
if ($conf->banque->enabled && $conf->global->ADHERENT_BANK_USE)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("BankTransactionLine").'</td><td class="valeur" colspan="2">';
|
||||
$bankline=new AccountLine($db);
|
||||
$result=$bankline->fetch($subscription->fk_bank);
|
||||
print $bankline->getNomUrl(1,0,'showall');
|
||||
if ($subscription->fk_bank)
|
||||
{
|
||||
$bankline=new AccountLine($db);
|
||||
$result=$bankline->fetch($subscription->fk_bank);
|
||||
print $bankline->getNomUrl(1,0,'showall');
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("NoneF");
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
print '<tr><td colspan="3" align="center">';
|
||||
print '<input type="submit" class="button" name="submit" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
@ -243,8 +250,8 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit')
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
print "\n";
|
||||
|
||||
print '</div>';
|
||||
|
||||
print '</div>';
|
||||
print "\n";
|
||||
}
|
||||
|
||||
@ -258,13 +265,13 @@ if ($rowid && $action != 'edit')
|
||||
|
||||
$result=$subscription->fetch($rowid);
|
||||
$result=$adh->fetch($subscription->fk_adherent);
|
||||
|
||||
|
||||
/*
|
||||
* Affichage onglets
|
||||
*/
|
||||
$h = 0;
|
||||
$head = array();
|
||||
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/adherents/fiche_subscription.php?rowid='.$subscription->id;
|
||||
$head[$h][1] = $langs->trans("SubscriptionCard");
|
||||
$head[$h][2] = 'general';
|
||||
@ -317,14 +324,14 @@ if ($rowid && $action != 'edit')
|
||||
|
||||
// Amount
|
||||
print '<tr><td>'.$langs->trans("Amount").'</td><td class="valeur" colspan="3">'.price($subscription->amount).'</td></tr>';
|
||||
|
||||
|
||||
// Amount
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td class="valeur" colspan="3">'.$subscription->note.'</td></tr>';
|
||||
|
||||
|
||||
// Bank account
|
||||
if ($conf->banque->enabled)
|
||||
{
|
||||
if ($subscription->fk_bank)
|
||||
if ($subscription->fk_bank)
|
||||
{
|
||||
$bankline=new AccountLine($db);
|
||||
$result=$bankline->fetch($subscription->fk_bank);
|
||||
@ -337,25 +344,25 @@ if ($rowid && $action != 'edit')
|
||||
print '<td colspan="3">';
|
||||
$bankline=new AccountLine($db);
|
||||
$result=$bankline->fetch($subscription->fk_bank);
|
||||
print $bankline->getNomUrl(1,0,'showall');
|
||||
print $bankline->getNomUrl(1,0,'showall');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
print "</table>\n";
|
||||
print '</form>';
|
||||
|
||||
|
||||
print "</div>\n";
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Barre d'actions
|
||||
*
|
||||
*/
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
|
||||
if ($user->rights->adherent->cotisation->creer)
|
||||
{
|
||||
if (! $bankline->rappro)
|
||||
@ -373,10 +380,10 @@ if ($rowid && $action != 'edit')
|
||||
{
|
||||
print "<a class=\"butActionDelete\" href=\"".$_SERVER["PHP_SELF"]."?rowid=".$subscription->id."&action=delete\">".$langs->trans("Delete")."</a>\n";
|
||||
}
|
||||
|
||||
|
||||
print '</div>';
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -70,12 +70,12 @@ class pdf_crabe extends ModelePDFFactures
|
||||
|
||||
$this->option_logo = 1; // Affiche logo
|
||||
$this->option_tva = 1; // Gere option tva FACTURE_TVAOPTION
|
||||
$this->option_modereg = 1; // Affiche mode règlement
|
||||
$this->option_condreg = 1; // Affiche conditions règlement
|
||||
$this->option_modereg = 1; // Affiche mode r<EFBFBD>glement
|
||||
$this->option_condreg = 1; // Affiche conditions r<EFBFBD>glement
|
||||
$this->option_codeproduitservice = 1; // Affiche code produit-service
|
||||
$this->option_multilang = 1; // Dispo en plusieurs langues
|
||||
$this->option_escompte = 1; // Affiche si il y a eu escompte
|
||||
$this->option_credit_note = 1; // Gère les avoirs
|
||||
$this->option_credit_note = 1; // G<EFBFBD>re les avoirs
|
||||
$this->option_freetext = 1; // Support add of a personalised text
|
||||
$this->option_draft_watermark = 1; //Support add of a watermark on drafts
|
||||
|
||||
@ -84,7 +84,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
|
||||
// Recupere emmetteur
|
||||
$this->emetteur=$mysoc;
|
||||
if (! $this->emetteur->pays_code) $this->emetteur->pays_code=substr($langs->defaultlang,-2); // Par defaut, si n'était pas défini
|
||||
if (! $this->emetteur->pays_code) $this->emetteur->pays_code=substr($langs->defaultlang,-2); // Par defaut, si n'<EFBFBD>tait pas d<>fini
|
||||
|
||||
// Defini position des colonnes
|
||||
$this->posxdesc=$this->marge_gauche+1;
|
||||
@ -101,8 +101,8 @@ class pdf_crabe extends ModelePDFFactures
|
||||
|
||||
|
||||
/**
|
||||
* \brief Fonction générant la facture sur le disque
|
||||
* \param fac Objet facture à générer (ou id si ancienne methode)
|
||||
* \brief Fonction g<EFBFBD>n<EFBFBD>rant la facture sur le disque
|
||||
* \param fac Objet facture <EFBFBD> g<EFBFBD>n<EFBFBD>rer (ou id si ancienne methode)
|
||||
* \param outputlangs Lang object for output language
|
||||
* \return int 1=ok, 0=ko
|
||||
*/
|
||||
@ -124,7 +124,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
|
||||
if ($conf->facture->dir_output)
|
||||
{
|
||||
// Définition de l'objet $fac (pour compatibilite ascendante)
|
||||
// D<EFBFBD>finition de l'objet $fac (pour compatibilite ascendante)
|
||||
if (! is_object($fac))
|
||||
{
|
||||
$id = $fac;
|
||||
@ -135,7 +135,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$deja_regle = $fac->getSommePaiement();
|
||||
$amount_credit_not_included = $fac->getSommeCreditNote();
|
||||
|
||||
// Définition de $dir et $file
|
||||
// D<EFBFBD>finition de $dir et $file
|
||||
if ($fac->specimen)
|
||||
{
|
||||
$dir = $conf->facture->dir_output;
|
||||
@ -167,7 +167,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$pdf=new FPDI_Protection('P','mm',$this->format);
|
||||
$pdfrights = array('print'); // Ne permet que l'impression du document
|
||||
$pdfuserpass = ''; // Mot de passe pour l'utilisateur final
|
||||
$pdfownerpass = NULL; // Mot de passe du propriétire, crée aléatoirement si pas défini
|
||||
$pdfownerpass = NULL; // Mot de passe du propri<EFBFBD>tire, cr<63>e al<61>atoirement si pas d<>fini
|
||||
$pdf->SetProtection($pdfrights,$pdfuserpass,$pdfownerpass);
|
||||
}
|
||||
else
|
||||
@ -259,7 +259,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
}
|
||||
else
|
||||
{
|
||||
//$fac->lignes[$i]->desc='€zaaaa';
|
||||
//$fac->lignes[$i]->desc='<EFBFBD>zaaaa';
|
||||
//print dol_string_is_good_iso($fac->lignes[$i]->desc);
|
||||
//print dol_htmlentitiesbr($fac->lignes[$i]->desc);
|
||||
//print exit;
|
||||
@ -342,9 +342,9 @@ class pdf_crabe extends ModelePDFFactures
|
||||
// Cherche nombre de lignes a venir pour savoir si place suffisante
|
||||
if ($i < ($nblignes - 1)) // If it's not last line
|
||||
{
|
||||
//on récupère la description du produit suivant
|
||||
//on r<EFBFBD>cup<EFBFBD>re la description du produit suivant
|
||||
$follow_descproduitservice = $fac->lignes[$i+1]->desc;
|
||||
//on compte le nombre de ligne afin de vérifier la place disponible (largeur de ligne 52 caracteres)
|
||||
//on compte le nombre de ligne afin de v<EFBFBD>rifier la place disponible (largeur de ligne 52 caracteres)
|
||||
$nblineFollowDesc = dol_nboflines_bis($follow_descproduitservice,52)*4;
|
||||
// Et si on affiche dates de validite, on ajoute encore une ligne
|
||||
if ($fac->lignes[$i]->date_start && $fac->lignes[$i]->date_end)
|
||||
@ -853,7 +853,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
{
|
||||
global $conf;
|
||||
|
||||
// Montants exprimés en (en tab_top - 1)
|
||||
// Montants exprim<EFBFBD>s en (en tab_top - 1)
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
$pdf->SetFont('Arial','',8);
|
||||
$titre = $outputlangs->transnoentities("AmountInCurrency",$outputlangs->transnoentities("Currency".$conf->monnaie));
|
||||
|
||||
@ -335,6 +335,7 @@ NextStep=Next step
|
||||
PreviousStep=Previous step
|
||||
Datas=Datas
|
||||
None=None
|
||||
NoneF=None
|
||||
Late=Late
|
||||
Photo=Picture
|
||||
Photos=Pictures
|
||||
|
||||
@ -336,6 +336,7 @@ NextStep=
|
||||
PreviousStep=Étape précédente
|
||||
Datas=Données
|
||||
None=Aucun
|
||||
NoneF=Aucune
|
||||
Late=Retard
|
||||
Photo=Photo
|
||||
Photos=Photos
|
||||
|
||||
Loading…
Reference in New Issue
Block a user