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