Integration contrib @DDgallo sur CERFA
This commit is contained in:
parent
637c493671
commit
61f40e100d
8 changed files with 218 additions and 42 deletions
|
|
@ -79,7 +79,7 @@ class Facture
|
|||
{
|
||||
throw new UserException("La valeur de $k est vide");
|
||||
}
|
||||
|
||||
|
||||
switch($k)
|
||||
{
|
||||
case 'type_facture':
|
||||
|
|
@ -205,7 +205,7 @@ class Facture
|
|||
{
|
||||
throw new UserException('Un document avec ce numéro existe déjà, hors le numéro doit être unique.');
|
||||
}
|
||||
|
||||
|
||||
$db->insert('plugin_facturation_factures', $data);
|
||||
$id = $db->lastInsertRowId();
|
||||
|
||||
|
|
@ -384,11 +384,15 @@ class Facture
|
|||
Utils::date_fr($content->souscription, 'd/m/Y')
|
||||
);
|
||||
}
|
||||
else {
|
||||
elseif ($row->type_facture != CERFA) {
|
||||
$row->contenu = implode("\n", array_map(function ($row) use ($currency) {
|
||||
return sprintf('%s : %s %s', $row->designation, Utils::money_format($row->prix), $currency);
|
||||
}, (array)$content));
|
||||
}
|
||||
else
|
||||
{
|
||||
$row->contenu = '';
|
||||
}
|
||||
});
|
||||
|
||||
$list->setPageSize(1000);
|
||||
|
|
@ -498,6 +502,17 @@ class Facture
|
|||
}
|
||||
}
|
||||
|
||||
/* modif DD -- lecture et retour des textes de CERFA -- */
|
||||
public function listTextesCerfa($menu = true)
|
||||
{
|
||||
$db = DB::getInstance();
|
||||
|
||||
$sel = ($menu) ? 'id, menu' : 'id, texte';
|
||||
$query = 'SELECT '.$sel.' FROM "plugin_facturation_txt_cerfa" WHERE 1 ORDER BY id ;';
|
||||
|
||||
return $db->getAssoc($query);
|
||||
}
|
||||
|
||||
public function getMoyenPaiement($code)
|
||||
{
|
||||
$db = DB::getInstance();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue