Compare commits
No commits in common. "39bde25d2422c31ad950c7302faa3507c5a699b5" and "b6bb4fd80da8c5b14b6bab8816b96d8a76ec21fe" have entirely different histories.
39bde25d24
...
b6bb4fd80d
@ -121,7 +121,7 @@ $form->runIf(f('select_cotis') && !$form->hasErrors(),
|
||||
}, 'add_cotis_1');
|
||||
|
||||
$form->runIf(f('add_cotis') && !$form->hasErrors(),
|
||||
function () use ($radio, $fields, $facture, $form)
|
||||
function () use ($radio, $fields, $facture)
|
||||
{
|
||||
$radio['type'] = f('cotisation');
|
||||
try
|
||||
|
@ -17,7 +17,7 @@ if (!$c)
|
||||
}
|
||||
|
||||
$form->runIf(f('save') && !$form->hasErrors(),
|
||||
function () use ($client, $id, $form)
|
||||
function () use ($client, $id)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ require_once __DIR__ . '/_inc.php';
|
||||
$session->requireAccess($session::SECTION_ACCOUNTING, $session::ACCESS_READ);
|
||||
|
||||
$form->runIf(f('add') && !$form->hasErrors(),
|
||||
function () use ($client, $form)
|
||||
function () use ($client)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -18,7 +18,7 @@ if (!$client)
|
||||
}
|
||||
|
||||
$form->runIf(f('delete') && !$form->hasErrors(),
|
||||
function () use ($facture, $f, $form)
|
||||
function () use ($facture, $f)
|
||||
{
|
||||
try {
|
||||
$facture->delete($f->id);
|
||||
|
@ -12,7 +12,6 @@ $session->requireAccess($session::SECTION_ACCOUNTING, $session::ACCESS_READ);
|
||||
|
||||
$list = $facture->list();
|
||||
$list->loadFromQueryString();
|
||||
$list->setPageSize(50);
|
||||
|
||||
$tpl->assign(compact('list'));
|
||||
|
||||
|
@ -59,18 +59,12 @@ if ($f->type_facture != CERFA)
|
||||
{
|
||||
case FACT:
|
||||
$doc = 'Facture n°'. $f->numero;
|
||||
$txtemis = $doc . " - Émise le " . $emission;
|
||||
$txtdest = "Adressée à :";
|
||||
break;
|
||||
case DEVIS:
|
||||
$doc = 'Devis n°'. $f->numero;
|
||||
$txtemis = $doc . " - Émis le " . $emission;
|
||||
$txtdest = "Adressé à :";
|
||||
break;
|
||||
case COTIS:
|
||||
$doc = 'Reçu de cotisation n°'. $f->numero;
|
||||
$txtemis = $doc . " - Émis le " . $emission;
|
||||
$txtdest = "Adressé à :";
|
||||
break;
|
||||
}
|
||||
|
||||
@ -103,7 +97,7 @@ if ($f->type_facture != CERFA)
|
||||
(($t = $config->get('site_asso'))?"Site web : $t<br>":'');
|
||||
|
||||
$receveur =
|
||||
$txtdest.'<br>'.
|
||||
'Adressé à :<br><br>'.
|
||||
'<b>'.$c->nom.'</b><br>'.
|
||||
$c->adresse."<br>".
|
||||
$c->code_postal.' '.$c->ville."<br>".
|
||||
@ -313,7 +307,7 @@ EOF;
|
||||
</head>
|
||||
<body>
|
||||
<p class="titre">
|
||||
$txtemis
|
||||
$doc - Émis le $emission
|
||||
</p>
|
||||
|
||||
<table class="adressage">
|
||||
|
@ -21,7 +21,7 @@ CREATE TABLE IF NOT EXISTS plugin_facturation_clients (
|
||||
adresse TEXT NOT NULL,
|
||||
code_postal TEXT NOT NULL,
|
||||
ville TEXT NOT NULL,
|
||||
siret TEXT,
|
||||
siret TEXT NOT NULL,
|
||||
date_creation TEXT NOT NULL DEFAULT CURRENT_DATE CHECK (date(date_creation) IS NOT NULL AND date(date_creation) = date_creation), -- Date d\'inscription
|
||||
telephone TEXT,
|
||||
email TEXT
|
||||
|
@ -40,7 +40,7 @@ class Client
|
||||
{
|
||||
$data[$key] = trim($data[$key]);
|
||||
|
||||
if($data[$key] == '' && ($key != 'siret' && $key != 'telephone' && $key != 'email'))
|
||||
if($data[$key] == '' && ($key != 'telephone' && $key != 'email'))
|
||||
{
|
||||
throw new UserException('Le champs '.$key.' doit être renseigné.');
|
||||
}
|
||||
@ -128,7 +128,7 @@ class Client
|
||||
'label' => 'Ville',
|
||||
],
|
||||
'siret' => [
|
||||
'label' => 'SIRET',
|
||||
'label' => 'Siret',
|
||||
],
|
||||
'telephone' => [
|
||||
'label' => 'Téléphone',
|
||||
|
@ -352,11 +352,11 @@ class Facture
|
||||
'select' => sprintf('CASE WHEN receveur_membre THEN %s ELSE c.nom END', $id_field),
|
||||
],
|
||||
'receveur_adresse' => [
|
||||
'label' => 'Adresse',
|
||||
'label' => 'Son adresse',
|
||||
'select' => 'CASE WHEN receveur_membre THEN u.adresse ELSE c.adresse END',
|
||||
],
|
||||
'receveur_ville' => [
|
||||
'label' => 'Ville',
|
||||
'label' => 'Sa ville',
|
||||
'select' => 'CASE WHEN receveur_membre THEN u.ville ELSE c.ville END',
|
||||
],
|
||||
'date_emission' => [
|
||||
@ -391,7 +391,6 @@ class Facture
|
||||
|
||||
$list = new DynamicList($columns, $tables);
|
||||
$list->orderBy('date_emission', true);
|
||||
$list->setCount('COUNT(f.id)');
|
||||
|
||||
$currency = Config::getInstance()->monnaie;
|
||||
|
||||
@ -421,6 +420,7 @@ class Facture
|
||||
}
|
||||
});
|
||||
|
||||
$list->setPageSize(1000);
|
||||
return $list;
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
{input type="text" name="adresse" label="Adresse" required=true source=$client}
|
||||
{input type="text" name="code_postal" label="Code postal" required=true source=$client}
|
||||
{input type="text" name="ville" label="Ville" required=true source=$client}
|
||||
{input type="text" name="siret" label="SIREN/SIRET" source=$client}
|
||||
{input type="text" name="siret" label="SIREN/SIRET" required=true source=$client}
|
||||
{input type="tel" name="telephone" label="Téléphone" source=$client}
|
||||
{input type="email" name="email" label="Adresse e-mail" source=$client}
|
||||
</dl>
|
||||
|
@ -55,7 +55,7 @@
|
||||
{input type="text" name="adresse" label="Adresse" required=true}
|
||||
{input type="text" name="code_postal" label="Code postal" required=true}
|
||||
{input type="text" name="ville" label="Ville" required=true}
|
||||
{input type="text" name="siret" label="SIREN/SIRET"}
|
||||
{input type="text" name="siret" label="SIREN/SIRET" required=true}
|
||||
{input type="tel" name="telephone" label="Téléphone"}
|
||||
{input type="email" name="email" label="Adresse e-mail"}
|
||||
</dl>
|
||||
|
@ -33,7 +33,6 @@
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
{$list->getHTMLPagination()|raw}
|
||||
|
||||
<p class="help">
|
||||
Export de la liste :
|
||||
|
@ -222,7 +222,7 @@ if (version_compare($old_version, '0.8.5', '<'))
|
||||
adresse TEXT NOT NULL,
|
||||
code_postal TEXT NOT NULL,
|
||||
ville TEXT NOT NULL,
|
||||
siret TEXT,
|
||||
siret TEXT NOT NULL,
|
||||
date_creation TEXT NOT NULL DEFAULT CURRENT_DATE CHECK (date(date_creation) IS NOT NULL AND date(date_creation) = date_creation),
|
||||
telephone TEXT,
|
||||
email TEXT
|
||||
@ -233,6 +233,7 @@ if (version_compare($old_version, '0.8.5', '<'))
|
||||
$sql = 'SELECT * FROM plugin_facturation_clients';
|
||||
foreach ($db->iterate($sql) as $client)
|
||||
{
|
||||
$client->siret = "";
|
||||
$db->insert('plugin_facturation_clients_tmp', $client);
|
||||
}
|
||||
// remplacer l'ancienne table par la nouvelle
|
||||
|
Loading…
Reference in New Issue
Block a user