Amélioration/Simplification de la création des factures récurrentes
This commit is contained in:
parent
80e1eba1d8
commit
c266aef8b7
@ -1886,6 +1886,13 @@ else
|
|||||||
if ($user->societe_id == 0 && $_GET['action'] <> 'valid' && $_GET['action'] <> 'editline')
|
if ($user->societe_id == 0 && $_GET['action'] <> 'valid' && $_GET['action'] <> 'editline')
|
||||||
{
|
{
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
|
// Récurrente
|
||||||
|
if (! defined('FACTURE_DISABLE_RECUR') || FACTURE_DISABLE_RECUR == 0) // Possibilité de désactiver les factures récurrentes
|
||||||
|
{
|
||||||
|
print ' <a class="butAction" href="facture/fiche-rec.php?facid='.$fac->id.'&action=create">'.$langs->trans("ChangeIntoRepeatableInvoice").'</a>';
|
||||||
|
}
|
||||||
|
|
||||||
// Valider
|
// Valider
|
||||||
if ($fac->statut == 0 && $num_lignes > 0)
|
if ($fac->statut == 0 && $num_lignes > 0)
|
||||||
{
|
{
|
||||||
@ -1947,15 +1954,6 @@ else
|
|||||||
print ' <a class="butAction" href="'.$_SERVER['PHP_SELF'].'?facid='.$fac->id.'&action=canceled">'.$langs->trans('ClassifyCanceled').'</a>';
|
print ' <a class="butAction" href="'.$_SERVER['PHP_SELF'].'?facid='.$fac->id.'&action=canceled">'.$langs->trans('ClassifyCanceled').'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Récurrente
|
|
||||||
if (! defined('FACTURE_DISABLE_RECUR') || FACTURE_DISABLE_RECUR == 0) // Possibilité de désactiver les factures récurrentes
|
|
||||||
{
|
|
||||||
if ($fac->statut > 0)
|
|
||||||
{
|
|
||||||
print ' <a class="butAction" href="facture/fiche-rec.php?facid='.$fac->id.'&action=create">Récurrente</a>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -29,13 +29,14 @@
|
|||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/notify.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/notify.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/facture.class.php");
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\class FactureRec
|
\class FactureRec
|
||||||
\brief Classe de gestion des factures recurrentes
|
\brief Classe de gestion des factures recurrentes/Modèles
|
||||||
*/
|
*/
|
||||||
class FactureRec
|
class FactureRec extends Facture
|
||||||
{
|
{
|
||||||
var $id;
|
var $id;
|
||||||
var $db;
|
var $db;
|
||||||
@ -53,8 +54,9 @@ class FactureRec
|
|||||||
var $propalid;
|
var $propalid;
|
||||||
var $projetid;
|
var $projetid;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialisation de la class
|
* \brief Initialisation de la class
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function FactureRec($DB, $facid=0)
|
function FactureRec($DB, $facid=0)
|
||||||
@ -62,26 +64,37 @@ class FactureRec
|
|||||||
$this->db = $DB ;
|
$this->db = $DB ;
|
||||||
$this->facid = $facid;
|
$this->facid = $facid;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Créé la facture
|
* \brief Créé la facture recurrente/modele
|
||||||
|
* \return int <0 si ko, id facture rec crée si ok
|
||||||
*/
|
*/
|
||||||
function create($user)
|
function create($user)
|
||||||
{
|
{
|
||||||
$facsrc = new Facture($this->db);
|
global $langs;
|
||||||
|
|
||||||
if ($facsrc->fetch($this->facid) > 0)
|
// Nettoyage parametere
|
||||||
|
$this->titre=trim($this->titre);
|
||||||
|
|
||||||
|
// Validation parameteres
|
||||||
|
if (! $this->titre)
|
||||||
{
|
{
|
||||||
/*
|
$this->error=$langs->trans("ErrorFieldRequired",$langs->trans("Title"));
|
||||||
* On positionne en mode brouillon la facture
|
return -3;
|
||||||
*/
|
|
||||||
$this->brouillon = 1;
|
|
||||||
if (! $facsrc->projetid)
|
|
||||||
{
|
|
||||||
$facsrc->projetid = "NULL";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Charge facture modele
|
||||||
|
$facsrc=new Facture($this->db);
|
||||||
|
$result=$facsrc->fetch($this->facid);
|
||||||
|
if ($result > 0)
|
||||||
|
{
|
||||||
|
// On positionne en mode brouillon la facture
|
||||||
|
$this->brouillon = 1;
|
||||||
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."facture_rec (titre, fk_soc, datec, amount, remise, remise_percent, note, fk_user_author,fk_projet, fk_cond_reglement) ";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."facture_rec (titre, fk_soc, datec, amount, remise, remise_percent, note, fk_user_author,fk_projet, fk_cond_reglement) ";
|
||||||
$sql .= " VALUES ('$this->titre', '$facsrc->socidp', now(), '$facsrc->amount', '$facsrc->remise', '$facsrc->remise_percent', '$this->note','$user->id', '$facsrc->projetid', '$facsrc->cond_reglement_id')";
|
$sql.= " VALUES ('$this->titre', '$facsrc->socidp', now(), '$facsrc->amount', '$facsrc->remise', '$facsrc->remise_percent', '".addslashes($this->note)."','$user->id',";
|
||||||
|
$sql.= " ".($facsrc->projetid?"'".$facsrc->projetid."'":"null").", ";
|
||||||
|
$sql.= " '".$facsrc->cond_reglement_id."')";
|
||||||
if ( $this->db->query($sql) )
|
if ( $this->db->query($sql) )
|
||||||
{
|
{
|
||||||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."facture_rec");
|
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."facture_rec");
|
||||||
@ -97,7 +110,6 @@ class FactureRec
|
|||||||
$prod->fetch($facsrc->lignes[$i]->produit_id);
|
$prod->fetch($facsrc->lignes[$i]->produit_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$result_insert = $this->addline($this->id,
|
$result_insert = $this->addline($this->id,
|
||||||
addslashes($facsrc->lignes[$i]->desc),
|
addslashes($facsrc->lignes[$i]->desc),
|
||||||
$facsrc->lignes[$i]->subprice,
|
$facsrc->lignes[$i]->subprice,
|
||||||
@ -109,7 +121,7 @@ class FactureRec
|
|||||||
|
|
||||||
if ( $result_insert < 0)
|
if ( $result_insert < 0)
|
||||||
{
|
{
|
||||||
print '<br>' . $this->db->error() .'<br>';
|
$this->error=$this->db->error().' sql='.$sql;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,8 +129,8 @@ class FactureRec
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $this->db->error() . '<b><br>'.$sql;
|
$this->error=$this->db->error().' sql='.$sql;
|
||||||
return 0;
|
return -2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -40,8 +40,19 @@ if (!$user->rights->facture->lire)
|
|||||||
$facid=isset($_GET["facid"])?$_GET["facid"]:$_POST["facid"];
|
$facid=isset($_GET["facid"])?$_GET["facid"]:$_POST["facid"];
|
||||||
$action=isset($_GET["action"])?$_GET["action"]:$_POST["action"];
|
$action=isset($_GET["action"])?$_GET["action"]:$_POST["action"];
|
||||||
|
|
||||||
|
if ($page == -1)
|
||||||
|
{
|
||||||
|
$page = 0 ;
|
||||||
|
}
|
||||||
|
$limit = $conf->liste_limit;
|
||||||
|
$offset = $limit * $page ;
|
||||||
|
|
||||||
|
if ($sortorder == "")
|
||||||
|
$sortorder="DESC";
|
||||||
|
|
||||||
|
if ($sortfield == "")
|
||||||
|
$sortfield="f.datef";
|
||||||
|
|
||||||
llxHeader('','Facture récurrente','ch-facture.html#s-fac-facture-rec');
|
|
||||||
|
|
||||||
// Sécurité accés client
|
// Sécurité accés client
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
@ -68,7 +79,9 @@ if ($_POST["action"] == 'add')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$action = "create";
|
$_GET["action"] = "create";
|
||||||
|
$_GET["facid"] = $_POST["facid"];
|
||||||
|
$mesg = '<div class="error">'.$facturerec->error.'</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,10 +93,14 @@ if ($_REQUEST["action"] == 'delete' && $user->rights->facture->supprimer)
|
|||||||
$facid = 0 ;
|
$facid = 0 ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
* Affichage page
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
llxHeader('','Facture récurrente','ch-facture.html#s-fac-facture-rec');
|
||||||
|
|
||||||
$html = new Form($db);
|
$html = new Form($db);
|
||||||
|
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
@ -93,13 +110,14 @@ $html = new Form($db);
|
|||||||
************************************************************************/
|
************************************************************************/
|
||||||
if ($_GET["action"] == 'create')
|
if ($_GET["action"] == 'create')
|
||||||
{
|
{
|
||||||
print_titre("Créer une facture récurrente");
|
print_titre($langs->trans("CreateRepeatableInvoice"));
|
||||||
|
|
||||||
|
if ($mesg) print $mesg.'<br>';
|
||||||
|
|
||||||
$facture = new Facture($db);
|
$facture = new Facture($db);
|
||||||
|
|
||||||
if ($facture->fetch($_GET["facid"]) > 0)
|
if ($facture->fetch($_GET["facid"]) > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
print '<form action="fiche-rec.php" method="post">';
|
print '<form action="fiche-rec.php" method="post">';
|
||||||
print '<input type="hidden" name="action" value="add">';
|
print '<input type="hidden" name="action" value="add">';
|
||||||
print '<input type="hidden" name="facid" value="'.$facture->id.'">';
|
print '<input type="hidden" name="facid" value="'.$facture->id.'">';
|
||||||
@ -241,7 +259,7 @@ if ($_GET["action"] == 'create')
|
|||||||
print '</select>';
|
print '</select>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
print '<tr><td colspan="3" align="center"><input type="submit" value="Créer"></td></tr>';
|
print '<tr><td colspan="3" align="center"><input type="submit" class="button" value="'.$langs->trans("Create").'"></td></tr>';
|
||||||
print "</form>\n";
|
print "</form>\n";
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
@ -271,7 +289,7 @@ else
|
|||||||
$author->id = $fac->user_author;
|
$author->id = $fac->user_author;
|
||||||
$author->fetch();
|
$author->fetch();
|
||||||
|
|
||||||
print_titre("Facture : ".$fac->titre);
|
print_titre($langs->trans("PredefinedInvoices").': '.$fac->titre);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Facture
|
* Facture
|
||||||
@ -300,9 +318,9 @@ else
|
|||||||
print '<td align="right" colspan="2"><b>'.price($fac->total_ht).'</b></td>';
|
print '<td align="right" colspan="2"><b>'.price($fac->total_ht).'</b></td>';
|
||||||
print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td></tr>';
|
print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("VAT").'</td><td align="right" colspan="2">'.price($fac->total_tva).'</td>';
|
print '<tr><td>'.$langs->trans("AmountVAT").'</td><td align="right" colspan="2">'.price($fac->total_tva).'</td>';
|
||||||
print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td></tr>';
|
print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td></tr>';
|
||||||
print '<tr><td>'.$langs->trans("TotalTTC").'</td><td align="right" colspan="2">'.price($fac->total_ttc).'</td>';
|
print '<tr><td>'.$langs->trans("AmountTTC").'</td><td align="right" colspan="2">'.price($fac->total_ttc).'</td>';
|
||||||
print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td></tr>';
|
print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td></tr>';
|
||||||
if ($fac->note)
|
if ($fac->note)
|
||||||
{
|
{
|
||||||
@ -349,39 +367,19 @@ else
|
|||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
/*
|
|
||||||
* Actions
|
|
||||||
*
|
/**
|
||||||
|
* Barre d'actions
|
||||||
*/
|
*/
|
||||||
if ($user->societe_id == 0 && $fac->paye == 0)
|
print '<div class="tabsAction">';
|
||||||
{
|
|
||||||
print '<p><table id="actions" width="100%"><tr>';
|
|
||||||
|
|
||||||
if ($fac->statut == 0 && $user->rights->facture->supprimer)
|
if ($fac->statut == 0 && $user->rights->facture->supprimer)
|
||||||
{
|
{
|
||||||
print "<td align=\"center\" width=\"25%\">[<a href=\"fiche-rec.php?facid=$facid&action=delete\">Supprimer</a>]</td>";
|
print '<a class="butActionDelete" href="fiche-rec.php?action=delete&facid='.$fac->id.'">'.$langs->trans('Delete').'</a>';
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print "<td align=\"center\" width=\"25%\">-</td>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print '</div>';
|
||||||
print "<td align=\"center\" width=\"25%\">-</td>";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print '<td align="center" width="25%">-</td>';
|
|
||||||
print '<td align="center" width="25%">-</td>';
|
|
||||||
|
|
||||||
print "</tr></table>";
|
|
||||||
}
|
|
||||||
print "<p>\n";
|
|
||||||
|
|
||||||
/*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -395,21 +393,9 @@ else
|
|||||||
* *
|
* *
|
||||||
* *
|
* *
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
if ($page == -1)
|
|
||||||
{
|
|
||||||
$page = 0 ;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($user->rights->facture->lire)
|
if ($user->rights->facture->lire)
|
||||||
{
|
{
|
||||||
$limit = $conf->liste_limit;
|
|
||||||
$offset = $limit * $page ;
|
|
||||||
|
|
||||||
if ($sortorder == "")
|
|
||||||
$sortorder="DESC";
|
|
||||||
|
|
||||||
if ($sortfield == "")
|
|
||||||
$sortfield="f.datef";
|
|
||||||
|
|
||||||
$sql = "SELECT s.nom,s.idp,f.titre,f.total,f.rowid as facid";
|
$sql = "SELECT s.nom,s.idp,f.titre,f.total,f.rowid as facid";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture_rec as f WHERE f.fk_soc = s.idp";
|
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture_rec as f WHERE f.fk_soc = s.idp";
|
||||||
@ -425,7 +411,7 @@ else
|
|||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
print_barre_liste($langs->trans("Bills"),$page,"fiche-rec.php","&socidp=$socidp",$sortfield,$sortorder,'',$num);
|
print_barre_liste($langs->trans("RepeatableInvoice"),$page,"fiche-rec.php","&socidp=$socidp",$sortfield,$sortorder,'',$num);
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
print "<table class=\"noborder\" width=\"100%\">";
|
print "<table class=\"noborder\" width=\"100%\">";
|
||||||
|
|||||||
@ -307,11 +307,11 @@ class MenuLeft {
|
|||||||
{
|
{
|
||||||
if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/clients.php?action=facturer",$langs->trans("NewBill"),2,$user->rights->facture->creer);
|
if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/clients.php?action=facturer",$langs->trans("NewBill"),2,$user->rights->facture->creer);
|
||||||
}
|
}
|
||||||
if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/facture/impayees.php",$langs->trans("Unpayed"),2,$user->rights->facture->lire);
|
|
||||||
if (! defined("FACTURE_DISABLE_RECUR") || ! FACTURE_DISABLE_RECUR)
|
if (! defined("FACTURE_DISABLE_RECUR") || ! FACTURE_DISABLE_RECUR)
|
||||||
{
|
{
|
||||||
if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/facture/fiche-rec.php","Récurrentes",2,$user->rights->facture->lire);
|
if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/facture/fiche-rec.php",$langs->trans("Repeatable"),2,$user->rights->facture->lire);
|
||||||
}
|
}
|
||||||
|
if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/facture/impayees.php",$langs->trans("Unpayed"),2,$user->rights->facture->lire);
|
||||||
if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/liste.php?leftmenu=customers_bills_payments",$langs->trans("Payments"),2,$user->rights->facture->lire);
|
if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/liste.php?leftmenu=customers_bills_payments",$langs->trans("Payments"),2,$user->rights->facture->lire);
|
||||||
|
|
||||||
if (eregi("customers_bills_payments",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/avalider.php",$langs->trans("MenuToValid"),3,$user->rights->facture->lire);
|
if (eregi("customers_bills_payments",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/avalider.php",$langs->trans("MenuToValid"),3,$user->rights->facture->lire);
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2005-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -317,11 +317,11 @@ class MenuLeft {
|
|||||||
{
|
{
|
||||||
if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/clients.php?action=facturer",$langs->trans("NewBill"),2,$user->rights->facture->creer);
|
if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/clients.php?action=facturer",$langs->trans("NewBill"),2,$user->rights->facture->creer);
|
||||||
}
|
}
|
||||||
if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/facture/impayees.php",$langs->trans("Unpayed"),2,$user->rights->facture->lire);
|
|
||||||
if (! defined("FACTURE_DISABLE_RECUR") || ! FACTURE_DISABLE_RECUR)
|
if (! defined("FACTURE_DISABLE_RECUR") || ! FACTURE_DISABLE_RECUR)
|
||||||
{
|
{
|
||||||
if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/facture/fiche-rec.php","Récurrentes",2,$user->rights->facture->lire);
|
if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/facture/fiche-rec.php",$langs->trans("Repeatable"),2,$user->rights->facture->lire);
|
||||||
}
|
}
|
||||||
|
if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/facture/impayees.php",$langs->trans("Unpayed"),2,$user->rights->facture->lire);
|
||||||
if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/liste.php?leftmenu=customers_bills_payments",$langs->trans("Payments"),2,$user->rights->facture->lire);
|
if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/liste.php?leftmenu=customers_bills_payments",$langs->trans("Payments"),2,$user->rights->facture->lire);
|
||||||
|
|
||||||
if (eregi("customers_bills_payments",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/avalider.php",$langs->trans("MenuToValid"),3,$user->rights->facture->lire);
|
if (eregi("customers_bills_payments",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/avalider.php",$langs->trans("MenuToValid"),3,$user->rights->facture->lire);
|
||||||
|
|||||||
@ -113,7 +113,11 @@ NonPercuRecuperable=Non per
|
|||||||
SetConditions=Set payment conditions
|
SetConditions=Set payment conditions
|
||||||
SetMode=Set payment mode
|
SetMode=Set payment mode
|
||||||
Billed=Billed
|
Billed=Billed
|
||||||
RecurringBills=Recurring invoices
|
RepeatableInvoice=Repeatable invoice
|
||||||
|
RepeatableInvoices=Repeatable invoices
|
||||||
|
Repeatable=Repeatable
|
||||||
|
ChangeIntoRepeatableInvoice=Change into repeatable
|
||||||
|
CreateRepeatableInvoice=Create repeatable invoice
|
||||||
ExportDataset_invoice_1=Customer invoices list and invoices' lines
|
ExportDataset_invoice_1=Customer invoices list and invoices' lines
|
||||||
ProformaBill=Proforma Bill:
|
ProformaBill=Proforma Bill:
|
||||||
VATIsUsed=Using VAT
|
VATIsUsed=Using VAT
|
||||||
|
|||||||
@ -113,7 +113,11 @@ NonPercuRecuperable=Non per
|
|||||||
SetConditions=Définir conditions de règlement
|
SetConditions=Définir conditions de règlement
|
||||||
SetMode=Définir mode de règlement
|
SetMode=Définir mode de règlement
|
||||||
Billed=Facturé
|
Billed=Facturé
|
||||||
RecurringBills=Factures récurrentes
|
RepeatableInvoice=Facture récurrente
|
||||||
|
RepeatableInvoices=Factures récurrentes
|
||||||
|
Repeatable=Récurrente
|
||||||
|
ChangeIntoRepeatableInvoice=Modifier en récurrente
|
||||||
|
CreateRepeatableInvoice=Créer facture récurrente
|
||||||
ExportDataset_invoice_1=Factures clients et lignes de facture
|
ExportDataset_invoice_1=Factures clients et lignes de facture
|
||||||
ProformaBill=Facture Proforma :
|
ProformaBill=Facture Proforma :
|
||||||
VATIsUsed=Assujéti à TVA
|
VATIsUsed=Assujéti à TVA
|
||||||
|
|||||||
@ -167,3 +167,16 @@ delete from llx_document_model where nom='azur' and type='order';
|
|||||||
delete from llx_document_model where nom='orange' and type='propal';
|
delete from llx_document_model where nom='orange' and type='propal';
|
||||||
|
|
||||||
alter table llx_actioncomm add column fk_commande integer after propalrowid;
|
alter table llx_actioncomm add column fk_commande integer after propalrowid;
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE llx_facture ADD UNIQUE INDEX idx_facture_uk_facnumber (facnumber);
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE llx_facture_rec ADD INDEX idx_facture_rec_fk_soc (fk_soc);
|
||||||
|
ALTER TABLE llx_facture_rec ADD INDEX idx_facture_rec_fk_user_author (fk_user_author);
|
||||||
|
ALTER TABLE llx_facture_rec ADD INDEX idx_facture_rec_fk_projet (fk_projet);
|
||||||
|
|
||||||
|
ALTER TABLE llx_facture_rec ADD CONSTRAINT fk_facture_rec_fk_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid);
|
||||||
|
ALTER TABLE llx_facture_rec ADD CONSTRAINT fk_facture_rec_fk_projet FOREIGN KEY (fk_projet) REFERENCES llx_projet (rowid);
|
||||||
|
|
||||||
|
ALTER TABLE llx_facture_rec ADD UNIQUE INDEX idx_facture_rec_uk_titre (titre);
|
||||||
|
|||||||
@ -31,3 +31,5 @@ ALTER TABLE llx_facture ADD CONSTRAINT fk_facture_fk_soc FOREIGN KEY
|
|||||||
ALTER TABLE llx_facture ADD CONSTRAINT fk_facture_fk_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid);
|
ALTER TABLE llx_facture ADD CONSTRAINT fk_facture_fk_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid);
|
||||||
ALTER TABLE llx_facture ADD CONSTRAINT fk_facture_fk_user_valid FOREIGN KEY (fk_user_valid) REFERENCES llx_user (rowid);
|
ALTER TABLE llx_facture ADD CONSTRAINT fk_facture_fk_user_valid FOREIGN KEY (fk_user_valid) REFERENCES llx_user (rowid);
|
||||||
ALTER TABLE llx_facture ADD CONSTRAINT fk_facture_fk_projet FOREIGN KEY (fk_projet) REFERENCES llx_projet (rowid);
|
ALTER TABLE llx_facture ADD CONSTRAINT fk_facture_fk_projet FOREIGN KEY (fk_projet) REFERENCES llx_projet (rowid);
|
||||||
|
|
||||||
|
ALTER TABLE llx_facture ADD UNIQUE INDEX idx_facture_uk_facnumber (facnumber);
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
-- ===========================================================================
|
-- ===========================================================================
|
||||||
-- Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
-- Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- This program is free software; you can redistribute it and/or modify
|
||||||
-- it under the terms of the GNU General Public License as published by
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@ -52,6 +53,4 @@ create table llx_facture
|
|||||||
note text,
|
note text,
|
||||||
note_public text,
|
note_public text,
|
||||||
model varchar(50),
|
model varchar(50),
|
||||||
|
|
||||||
UNIQUE INDEX (facnumber)
|
|
||||||
)type=innodb;
|
)type=innodb;
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
-- ===========================================================================
|
-- ===========================================================================
|
||||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
-- Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- This program is free software; you can redistribute it and/or modify
|
||||||
-- it under the terms of the GNU General Public License as published by
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@ -29,6 +30,7 @@ create table llx_facture_rec
|
|||||||
amount real DEFAULT 0 NOT NULL,
|
amount real DEFAULT 0 NOT NULL,
|
||||||
remise real DEFAULT 0,
|
remise real DEFAULT 0,
|
||||||
remise_percent real DEFAULT 0,
|
remise_percent real DEFAULT 0,
|
||||||
|
remise_absolue real DEFAULT 0,
|
||||||
tva real DEFAULT 0,
|
tva real DEFAULT 0,
|
||||||
total real DEFAULT 0,
|
total real DEFAULT 0,
|
||||||
total_ttc real DEFAULT 0,
|
total_ttc real DEFAULT 0,
|
||||||
@ -36,8 +38,11 @@ create table llx_facture_rec
|
|||||||
fk_user_author integer, -- createur
|
fk_user_author integer, -- createur
|
||||||
fk_projet integer, -- projet auquel est associé la facture
|
fk_projet integer, -- projet auquel est associé la facture
|
||||||
fk_cond_reglement integer, -- condition de reglement
|
fk_cond_reglement integer, -- condition de reglement
|
||||||
|
fk_mode_reglement integer, -- mode de reglement (Virement, Prélèvement)
|
||||||
|
date_lim_reglement date, -- date limite de reglement
|
||||||
|
|
||||||
note text,
|
note text,
|
||||||
|
note_public text,
|
||||||
|
|
||||||
frequency char(2) DEFAULT NULL,
|
frequency char(2) DEFAULT NULL,
|
||||||
last_gen varchar(7) DEFAULT NULL,
|
last_gen varchar(7) DEFAULT NULL,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user