Migrate to Paheko 1.3
This commit is contained in:
parent
161659acfb
commit
235f8ceeed
31 changed files with 95 additions and 94 deletions
|
|
@ -4,10 +4,11 @@ namespace Paheko;
|
|||
|
||||
require_once __DIR__ . '/_inc.php';
|
||||
$session->requireAccess($session::SECTION_ACCOUNTING, $session::ACCESS_READ);
|
||||
$membres = new Membres;
|
||||
$users = new Users\Users;
|
||||
|
||||
qv(['id' => 'required|numeric']);
|
||||
f(['id' => 'required|numeric']);
|
||||
$id = (int) qg('id');
|
||||
$id_field = Users\DynamicFields::getNameFieldsSQL();
|
||||
|
||||
// Vérification que le document existe
|
||||
if (!$f = $facture->get($id))
|
||||
|
|
@ -22,8 +23,8 @@ try
|
|||
{
|
||||
if ($f->receveur_membre)
|
||||
{
|
||||
$c = $membres->get($f->receveur_id);
|
||||
$c->identite = $c->$identite;
|
||||
$c = $users->get($f->receveur_id);
|
||||
$c->$id_field = $c->$identite;
|
||||
foreach(['ville','code_postal','adresse'] as $v)
|
||||
{
|
||||
if($c->$v == '')
|
||||
|
|
@ -35,7 +36,7 @@ try
|
|||
else
|
||||
{
|
||||
$c = $client->get($f->receveur_id);
|
||||
$c->identite = $c->nom;
|
||||
$c->$id_field = $c->nom;
|
||||
}
|
||||
}
|
||||
catch(UserException $e)
|
||||
|
|
@ -72,7 +73,7 @@ if ($f->type_facture != CERFA)
|
|||
$asso =
|
||||
// 'Émis par :<br><br>'.
|
||||
'<b>'.$config->get('nom_asso')."</b><br>".
|
||||
str_replace("\n", '<br>', $config->get('adresse_asso'))."<br>".
|
||||
str_replace("\n", '<br>', $config->get('org_address'))."<br>".
|
||||
(($t = $plugin->getConfig('rna_asso'))?"RNA : $t<br>":'').
|
||||
(($t = $plugin->getConfig('siret_asso'))?"SIRET : $t<br>":'').
|
||||
(($t = $config->get('email_asso'))?"Email : $t<br>":'').
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue