mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-12 04:21:30 +01:00
Uniformisation du code pour la gestion des numrotation et modules entre factures, propales, fichieinter, commandes, dons
This commit is contained in:
@@ -28,22 +28,22 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
|
include_once(DOL_DOCUMENT_ROOT.'/includes/modules/propale/modules_propale.php');
|
||||||
|
if (defined("PROPALE_ADDON") && is_readable(DOL_DOCUMENT_ROOT ."/includes/modules/propale/".PROPALE_ADDON.".php"))
|
||||||
|
{
|
||||||
|
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/propale/".PROPALE_ADDON.".php");
|
||||||
|
}
|
||||||
|
|
||||||
$langs->load("propal");
|
$langs->load("propal");
|
||||||
$langs->load("projects");
|
$langs->load("projects");
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
|
|
||||||
$user->getrights('propale');
|
$user->getrights('propale');
|
||||||
$user->getrights('fichinter');
|
$user->getrights('fichinter');
|
||||||
$user->getrights('commande');
|
$user->getrights('commande');
|
||||||
$user->getrights('projet');
|
$user->getrights('projet');
|
||||||
|
|
||||||
|
|
||||||
if (defined("PROPALE_ADDON") && is_readable(DOL_DOCUMENT_ROOT ."/includes/modules/propale/".PROPALE_ADDON.".php"))
|
|
||||||
{
|
|
||||||
require(DOL_DOCUMENT_ROOT ."/includes/modules/propale/".PROPALE_ADDON.".php");
|
|
||||||
}
|
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
@@ -171,7 +171,6 @@ if ($_GET["action"] == 'create')
|
|||||||
|
|
||||||
print '<td>Mod<6F>le</td>';
|
print '<td>Mod<6F>le</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/includes/modules/propale/modules_propale.php');
|
|
||||||
$model=new ModelePDFPropales();
|
$model=new ModelePDFPropales();
|
||||||
$liste=$model->liste_modeles($db);
|
$liste=$model->liste_modeles($db);
|
||||||
$form->select_array("modelpdf",$liste,$conf->global->PROPALE_ADDON_PDF);
|
$form->select_array("modelpdf",$liste,$conf->global->PROPALE_ADDON_PDF);
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/propale/modules_propale.php");
|
||||||
|
|
||||||
$user->getrights('propale');
|
$user->getrights('propale');
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -67,6 +66,7 @@ if ($_POST["action"] == 'update')
|
|||||||
if ($don->update($user) > 0)
|
if ($don->update($user) > 0)
|
||||||
{
|
{
|
||||||
Header("Location: fiche.php?rowid=".$don->id);
|
Header("Location: fiche.php?rowid=".$don->id);
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -80,7 +80,6 @@ if ($_POST["action"] == 'add')
|
|||||||
|
|
||||||
if ($_POST["amount"] > 0)
|
if ($_POST["amount"] > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
$don = new Don($db);
|
$don = new Don($db);
|
||||||
|
|
||||||
$don->prenom = $_POST["prenom"];
|
$don->prenom = $_POST["prenom"];
|
||||||
@@ -102,6 +101,7 @@ if ($_POST["action"] == 'add')
|
|||||||
if ($don->create($user) > 0)
|
if ($don->create($user) > 0)
|
||||||
{
|
{
|
||||||
Header("Location: index.php");
|
Header("Location: index.php");
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -116,6 +116,7 @@ if ($_GET["action"] == 'delete')
|
|||||||
$don = new Don($db);
|
$don = new Don($db);
|
||||||
$don->delete($_GET["rowid"]);
|
$don->delete($_GET["rowid"]);
|
||||||
Header("Location: liste.php");
|
Header("Location: liste.php");
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
if ($_POST["action"] == 'commentaire')
|
if ($_POST["action"] == 'commentaire')
|
||||||
{
|
{
|
||||||
@@ -129,6 +130,7 @@ if ($_GET["action"] == 'valid_promesse')
|
|||||||
if ($don->valid_promesse($_GET["rowid"], $user->id))
|
if ($don->valid_promesse($_GET["rowid"], $user->id))
|
||||||
{
|
{
|
||||||
Header("Location: liste.php");
|
Header("Location: liste.php");
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($_GET["action"] == 'set_payed')
|
if ($_GET["action"] == 'set_payed')
|
||||||
@@ -137,6 +139,7 @@ if ($_GET["action"] == 'set_payed')
|
|||||||
if ($don->set_paye($_GET["rowid"], $modepaiement))
|
if ($don->set_paye($_GET["rowid"], $modepaiement))
|
||||||
{
|
{
|
||||||
Header("Location: liste.php");
|
Header("Location: liste.php");
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($_GET["action"] == 'set_encaisse')
|
if ($_GET["action"] == 'set_encaisse')
|
||||||
@@ -145,9 +148,19 @@ if ($_GET["action"] == 'set_encaisse')
|
|||||||
if ($don->set_encaisse($_GET["rowid"]))
|
if ($don->set_encaisse($_GET["rowid"]))
|
||||||
{
|
{
|
||||||
Header("Location: liste.php");
|
Header("Location: liste.php");
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* G<>n<EFBFBD>rer ou reg<65>n<EFBFBD>rer le document
|
||||||
|
*/
|
||||||
|
if ($_GET['action'] == 'build')
|
||||||
|
{
|
||||||
|
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/dons/modules_don.php");
|
||||||
|
don_create($db, $_GET['rowid']);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
@@ -161,56 +174,58 @@ $html=new Form($db);
|
|||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
if ($_GET["action"] == 'create') {
|
if ($_GET["action"] == 'create')
|
||||||
|
{
|
||||||
print_titre($langs->trans("AddDonation"));
|
print_titre($langs->trans("AddDonation"));
|
||||||
|
|
||||||
print '<form action="fiche.php" method="post">';
|
print '<form action="fiche.php" method="post">';
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
print '<input type="hidden" name="action" value="add">';
|
print '<input type="hidden" name="action" value="add">';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Date").'</td><td>';
|
print '<tr><td>'.$langs->trans("Date").'</td><td>';
|
||||||
$html->select_date();
|
$html->select_date();
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td rowspan="12" valign="top">'.$langs->trans("Comments").' :<br>';
|
$nbrows=11;
|
||||||
print "<textarea name=\"comment\" wrap=\"soft\" cols=\"40\" rows=\"15\"></textarea></td></tr>";
|
if ($conf->projet->enabled) $nbrows++;
|
||||||
print "<tr><td>".$langs->trans("PaymentMode")."</td><td>\n";
|
|
||||||
|
print '<td rowspan="'.$nbrows.'" valign="top">'.$langs->trans("Comments").' :<br>';
|
||||||
$paiement = new Paiement($db);
|
print "<textarea name=\"comment\" wrap=\"soft\" cols=\"40\" rows=\"15\"></textarea></td></tr>";
|
||||||
|
print "<tr><td>".$langs->trans("PaymentMode")."</td><td>\n";
|
||||||
$paiement->select("modepaiement","CRDT");
|
|
||||||
|
$paiement = new Paiement($db);
|
||||||
print "</td></tr>\n";
|
|
||||||
|
$paiement->select("modepaiement","CRDT");
|
||||||
if ($conf->projet->enabled)
|
|
||||||
{
|
print "</td></tr>\n";
|
||||||
// Si module projet actif
|
|
||||||
print "<tr><td>".$langs->trans("Project")."</td><td>";
|
if ($conf->projet->enabled)
|
||||||
$html->select_projects('','','',"projetid");
|
{
|
||||||
print "</td></tr>\n";
|
// Si module projet actif
|
||||||
}
|
print "<tr><td>".$langs->trans("Project")."</td><td>";
|
||||||
|
$html->select_projects('','','',"projetid");
|
||||||
print "<tr><td>".$langs->trans("PublicDonation")."</td><td>";
|
print "</td></tr>\n";
|
||||||
$html=new Form($db);
|
}
|
||||||
$html->selectyesno("public",1,1);
|
|
||||||
print "</td></tr>\n";
|
print "<tr><td>".$langs->trans("PublicDonation")."</td><td>";
|
||||||
|
$html=new Form($db);
|
||||||
$langs->load("companies");
|
$html->selectyesno("public",1,1);
|
||||||
print "<tr>".'<td>'.$langs->trans("Company").'</td><td><input type="text" name="societe" size="40"></td></tr>';
|
print "</td></tr>\n";
|
||||||
print "<tr>".'<td>'.$langs->trans("Firstname").'</td><td><input type="text" name="prenom" size="40"></td></tr>';
|
|
||||||
print "<tr>".'<td>'.$langs->trans("Lastname").'</td><td><input type="text" name="nom" size="40"></td></tr>';
|
$langs->load("companies");
|
||||||
print "<tr>".'<td>'.$langs->trans("Address").'</td><td>';
|
print "<tr>".'<td>'.$langs->trans("Company").'</td><td><input type="text" name="societe" size="40"></td></tr>';
|
||||||
print '<textarea name="adresse" wrap="soft" cols="40" rows="3"></textarea></td></tr>';
|
print "<tr>".'<td>'.$langs->trans("Firstname").'</td><td><input type="text" name="prenom" size="40"></td></tr>';
|
||||||
print "<tr>".'<td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td><input type="text" name="cp" size="8"> <input type="text" name="ville" size="40"></td></tr>';
|
print "<tr>".'<td>'.$langs->trans("Lastname").'</td><td><input type="text" name="nom" size="40"></td></tr>';
|
||||||
print "<tr>".'<td>'.$langs->trans("Country").'</td><td><input type="text" name="pays" size="40"></td></tr>';
|
print "<tr>".'<td>'.$langs->trans("Address").'</td><td>';
|
||||||
print "<tr>".'<td>'.$langs->trans("EMail").'</td><td><input type="text" name="email" size="40"></td></tr>';
|
print '<textarea name="adresse" wrap="soft" cols="40" rows="3"></textarea></td></tr>';
|
||||||
print "<tr>".'<td>'.$langs->trans("Amount").'</td><td><input type="text" name="amount" size="10"> '.$langs->trans("Currency".$conf->monnaie).'</td></tr>';
|
print "<tr>".'<td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td><input type="text" name="cp" size="8"> <input type="text" name="ville" size="40"></td></tr>';
|
||||||
print "<tr>".'<td colspan="3" align="center"><input type="submit" value="'.$langs->trans("Save").'"></td></tr>';
|
print "<tr>".'<td>'.$langs->trans("Country").'</td><td><input type="text" name="pays" size="40"></td></tr>';
|
||||||
print "</table>\n";
|
print "<tr>".'<td>'.$langs->trans("EMail").'</td><td><input type="text" name="email" size="40"></td></tr>';
|
||||||
print "</form>\n";
|
print "<tr>".'<td>'.$langs->trans("Amount").'</td><td><input type="text" name="amount" size="10"> '.$langs->trans("Currency".$conf->monnaie).'</td></tr>';
|
||||||
|
print "<tr>".'<td colspan="3" align="center"><input type="submit" value="'.$langs->trans("Save").'"></td></tr>';
|
||||||
|
print "</table>\n";
|
||||||
|
print "</form>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -222,83 +237,88 @@ if ($_GET["action"] == 'create') {
|
|||||||
|
|
||||||
if ($_GET["rowid"] && $_GET["action"] == 'edit')
|
if ($_GET["rowid"] && $_GET["action"] == 'edit')
|
||||||
{
|
{
|
||||||
|
$don = new Don($db);
|
||||||
$don = new Don($db);
|
$don->id = $_GET["rowid"];
|
||||||
$don->id = $_GET["rowid"];
|
$don->fetch($_GET["rowid"]);
|
||||||
$don->fetch($_GET["rowid"]);
|
|
||||||
|
$h=0;
|
||||||
$h=0;
|
$head[$h][0] = DOL_URL_ROOT."/compta/dons/fiche.php?rowid=".$_GET["rowid"];
|
||||||
$head[$h][0] = DOL_URL_ROOT."/compta/dons/fiche.php?rowid=".$_GET["rowid"];
|
$head[$h][1] = $langs->trans("Donation");
|
||||||
$head[$h][1] = $langs->trans("Donation");
|
$hselected=$h;
|
||||||
$hselected=$h;
|
$h++;
|
||||||
$h++;
|
|
||||||
|
dolibarr_fiche_head($head, $hselected, $langs->trans("Ref").": ".$_GET["rowid"]);
|
||||||
dolibarr_fiche_head($head, $hselected, $langs->trans("Ref").": ".$_GET["rowid"]);
|
|
||||||
|
print '<form action="fiche.php" method="post">';
|
||||||
print '<form action="fiche.php" method="post">';
|
print '<table class="border" width="100%">';
|
||||||
print '<table class="border" width="100%">';
|
|
||||||
|
print '<input type="hidden" name="action" value="update">';
|
||||||
print '<input type="hidden" name="action" value="update">';
|
print '<input type="hidden" name="rowid" value="'.$don->id.'">';
|
||||||
print '<input type="hidden" name="rowid" value="'.$don->id.'">';
|
|
||||||
|
print "<tr>".'<td>'.$langs->trans("Date").'</td><td>';
|
||||||
print "<tr>".'<td>'.$langs->trans("Date").'</td><td>';
|
$html->select_date($don->date);
|
||||||
$html->select_date($don->date);
|
print '</td>';
|
||||||
print '</td>';
|
|
||||||
|
$nbrows=12;
|
||||||
print '<td rowspan="12" valign="top">'.$langs->trans("Comments").' :<br>';
|
if ($conf->projet->enabled) $nbrows++;
|
||||||
print "<textarea name=\"comment\" wrap=\"soft\" cols=\"40\" rows=\"15\">$don->commentaire</textarea></td></tr>";
|
|
||||||
|
print '<td rowspan="'.$nbrows.'" valign="top">'.$langs->trans("Comments").' :<br>';
|
||||||
if ($conf->projet->enabled)
|
print "<textarea name=\"comment\" wrap=\"soft\" cols=\"40\" rows=\"15\">$don->commentaire</textarea></td></tr>";
|
||||||
{
|
|
||||||
print "<tr><td>".$langs->trans("Project")."</td><td><select name=\"projetid\">\n";
|
if ($conf->projet->enabled)
|
||||||
$sql = "SELECT rowid, libelle FROM ".MAIN_DB_PREFIX."don_projet ORDER BY rowid";
|
{
|
||||||
if ($db->query($sql))
|
print "<tr><td>".$langs->trans("Project")."</td><td><select name=\"projetid\">\n";
|
||||||
|
$sql = "SELECT rowid, libelle FROM ".MAIN_DB_PREFIX."don_projet";
|
||||||
|
$sql.= " ORDER BY rowid";
|
||||||
|
if ($db->query($sql))
|
||||||
{
|
{
|
||||||
$num = $db->num_rows();
|
$num = $db->num_rows();
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$objopt = $db->fetch_object();
|
$objopt = $db->fetch_object();
|
||||||
print "<option value=\"$objopt->rowid\">$objopt->libelle</option>\n";
|
print "<option value=\"$objopt->rowid\">$objopt->libelle</option>\n";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dolibarr_print_error($db);
|
dolibarr_print_error($db);
|
||||||
}
|
}
|
||||||
print "</select><br>";
|
print "</select><br>";
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<tr><td>".$langs->trans("PublicDonation")."</td><td>";
|
print "<tr><td>".$langs->trans("PublicDonation")."</td><td>";
|
||||||
$html=new Form($db);
|
$html=new Form($db);
|
||||||
$html->selectyesno("public",1,1);
|
$html->selectyesno("public",1,1);
|
||||||
print "</td>";
|
print "</td>";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
$langs->load("companies");
|
||||||
|
print "<tr>".'<td>'.$langs->trans("Company").'</td><td><input type="text" name="societe" size="40" value="'.$don->societe.'"></td></tr>';
|
||||||
|
print "<tr>".'<td>'.$langs->trans("Firstname").'</td><td><input type="text" name="prenom" size="40" value="'.$don->prenom.'"></td></tr>';
|
||||||
|
print "<tr>".'<td>'.$langs->trans("Lastname").'</td><td><input type="text" name="nom" size="40" value="'.$don->nom.'"></td></tr>';
|
||||||
|
print "<tr>".'<td>'.$langs->trans("Address").'</td><td>';
|
||||||
|
print '<textarea name="adresse" wrap="soft" cols="40" rows="'.ROWS_3.'">'.$don->adresse.'</textarea></td></tr>';
|
||||||
|
print "<tr>".'<td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td><input type="text" name="cp" size="8" value="'.$don->cp.'"> <input type="text" name="ville" size="40" value="'.$don->ville.'"></td></tr>';
|
||||||
|
print "<tr>".'<td>'.$langs->trans("Country").'</td><td><input type="text" name="pays" size="40" value="'.$don->pays.'"></td></tr>';
|
||||||
|
print "<tr>".'<td>'.$langs->trans("EMail").'</td><td><input type="text" name="email" size="40" value="'.$don->email.'"></td></tr>';
|
||||||
|
print "<tr>".'<td>'.$langs->trans("Amount").'</td><td><input type="text" name="amount" size="10" value="'.$don->amount.'"> '.$langs->trans("Currency".$conf->monnaie).'</td></tr>';
|
||||||
|
|
||||||
|
print "<tr><td>".$langs->trans("PaymentMode")."</td><td>\n";
|
||||||
|
$paiement = new Paiement($db);
|
||||||
|
$paiement->select("modepaiement","CRDT");
|
||||||
|
print "</td></tr>\n";
|
||||||
|
|
||||||
$langs->load("companies");
|
print "<tr>".'<td>'.$langs->trans("Status").'</td><td>'.$don->getLibStatut().'</td></tr>';
|
||||||
print "<tr>".'<td>'.$langs->trans("Company").'</td><td><input type="text" name="societe" size="40" value="'.$don->societe.'"></td></tr>';
|
|
||||||
print "<tr>".'<td>'.$langs->trans("Firstname").'</td><td><input type="text" name="prenom" size="40" value="'.$don->prenom.'"></td></tr>';
|
print "<tr>".'<td colspan="3" align="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"></td></tr>';
|
||||||
print "<tr>".'<td>'.$langs->trans("Lastname").'</td><td><input type="text" name="nom" size="40" value="'.$don->nom.'"></td></tr>';
|
|
||||||
print "<tr>".'<td>'.$langs->trans("Address").'</td><td>';
|
print "</table>\n";
|
||||||
print '<textarea name="adresse" wrap="soft" cols="40" rows="3">'.$don->adresse.'</textarea></td></tr>';
|
print "</form>\n";
|
||||||
print "<tr>".'<td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td><input type="text" name="cp" size="8" value="'.$don->cp.'"> <input type="text" name="ville" size="40" value="'.$don->ville.'"></td></tr>';
|
|
||||||
print "<tr>".'<td>'.$langs->trans("Country").'</td><td><input type="text" name="pays" size="40" value="'.$don->pays.'"></td></tr>';
|
print "</div>\n";
|
||||||
print "<tr>".'<td>'.$langs->trans("EMail").'</td><td><input type="text" name="email" size="40" value="'.$don->email.'"></td></tr>';
|
|
||||||
print "<tr>".'<td>'.$langs->trans("Amount").'</td><td><input type="text" name="amount" size="10" value="'.$don->amount.'"> '.$langs->trans("Currency".$conf->monnaie).'</td></tr>';
|
|
||||||
|
|
||||||
print "<tr><td>".$langs->trans("PaymentMode")."</td><td>\n";
|
|
||||||
$paiement = new Paiement($db);
|
|
||||||
$paiement->select("modepaiement","CRDT");
|
|
||||||
print "</td></tr>\n";
|
|
||||||
|
|
||||||
print "<tr>".'<td colspan="3" align="center"><input type="submit" value="'.$langs->trans("Save").'"></td></tr>';
|
|
||||||
|
|
||||||
print "</table>\n";
|
|
||||||
print "</form>\n";
|
|
||||||
|
|
||||||
print "</div>\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -310,56 +330,61 @@ if ($_GET["rowid"] && $_GET["action"] == 'edit')
|
|||||||
/* ************************************************************ */
|
/* ************************************************************ */
|
||||||
if ($_GET["rowid"] && $_GET["action"] != 'edit')
|
if ($_GET["rowid"] && $_GET["action"] != 'edit')
|
||||||
{
|
{
|
||||||
|
$don = new Don($db);
|
||||||
|
$don->id = $_GET["rowid"];
|
||||||
|
$don->fetch($_GET["rowid"]);
|
||||||
|
|
||||||
|
|
||||||
|
$h=0;
|
||||||
|
$head[$h][0] = DOL_URL_ROOT."/compta/dons/fiche.php?rowid=".$_GET["rowid"];
|
||||||
|
$head[$h][1] = $langs->trans("Donation");
|
||||||
|
$hselected=$h;
|
||||||
|
$h++;
|
||||||
|
|
||||||
|
dolibarr_fiche_head($head, $hselected, $langs->trans("Ref").": ".$_GET["rowid"]);
|
||||||
|
|
||||||
|
print "<form action=\"fiche.php\" method=\"post\">";
|
||||||
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
|
print "<tr><td>".$langs->trans("Date")."</td><td>";
|
||||||
|
print dolibarr_print_date($don->date,"%d %B %Y");
|
||||||
|
print "</td>";
|
||||||
|
|
||||||
|
$nbrows=12;
|
||||||
|
if ($conf->projet->enabled) $nbrows++;
|
||||||
|
|
||||||
|
print '<td rowspan="'.$nbrows.'" valign="top" width="50%">'.$langs->trans("Comments").' :<br>';
|
||||||
|
print nl2br($don->commentaire).'</td></tr>';
|
||||||
|
|
||||||
|
if ($conf->projet->enabled)
|
||||||
|
{
|
||||||
|
print "<tr>".'<td>'.$langs->trans("Project").'</td><td>'.$don->projet.'</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
print "<tr><td>".$langs->trans("PublicDonation")."</td><td>";
|
||||||
|
print $yn[$don->public];
|
||||||
|
print "</td></tr>\n";
|
||||||
|
|
||||||
|
print "<tr>".'<td>'.$langs->trans("Company").'</td><td>'.$don->societe.'</td></tr>';
|
||||||
|
print "<tr>".'<td>'.$langs->trans("Firstname").'</td><td>'.$don->prenom.'</td></tr>';
|
||||||
|
print "<tr>".'<td>'.$langs->trans("Lastname").'</td><td>'.$don->nom.'</td></tr>';
|
||||||
|
print "<tr>".'<td>'.$langs->trans("Address").'</td><td>'.nl2br($don->adresse).'</td></tr>';
|
||||||
|
print "<tr>".'<td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td>'.$don->cp.' '.$don->ville.'</td></tr>';
|
||||||
|
print "<tr>".'<td>'.$langs->trans("Country").'</td><td>'.$don->pays.'</td></tr>';
|
||||||
|
print "<tr>".'<td>'.$langs->trans("EMail").'</td><td>'.$don->email.'</td></tr>';
|
||||||
|
print "<tr>".'<td>'.$langs->trans("Amount").'</td><td>'.price($don->amount).' '.$langs->trans("Currency".$conf->monnaie).'</td></tr>';
|
||||||
|
print "<tr><td>".$langs->trans("PaymentMode")."</td><td>";
|
||||||
|
print $don->modepaiement;
|
||||||
|
print "</td></tr>\n";
|
||||||
|
|
||||||
$don = new Don($db);
|
print "<tr>".'<td>'.$langs->trans("Status").'</td><td>'.$don->getLibStatut().'</td></tr>';
|
||||||
$don->id = $_GET["rowid"];
|
|
||||||
$don->fetch($_GET["rowid"]);
|
print "</table>\n";
|
||||||
|
print "</form>\n";
|
||||||
|
|
||||||
|
print "</div>";
|
||||||
|
|
||||||
|
|
||||||
$h=0;
|
|
||||||
$head[$h][0] = DOL_URL_ROOT."/compta/dons/fiche.php?rowid=".$_GET["rowid"];
|
|
||||||
$head[$h][1] = $langs->trans("Donation");
|
|
||||||
$hselected=$h;
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
dolibarr_fiche_head($head, $hselected, $langs->trans("Ref").": ".$_GET["rowid"]);
|
|
||||||
|
|
||||||
print "<form action=\"fiche.php\" method=\"post\">";
|
|
||||||
print '<table class="border" width="100%">';
|
|
||||||
|
|
||||||
print "<tr><td>".$langs->trans("Date")."</td><td>";
|
|
||||||
print dolibarr_print_date($don->date,"%d %B %Y");
|
|
||||||
print "</td>";
|
|
||||||
|
|
||||||
print '<td rowspan="12" valign="top" width="50%">'.$langs->trans("Comments").' :<br>';
|
|
||||||
print nl2br($don->commentaire).'</td></tr>';
|
|
||||||
|
|
||||||
if ($conf->projet->enabled) {
|
|
||||||
print "<tr>".'<td>'.$langs->trans("Project").'</td><td>'.$don->projet.'</td></tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print "<tr><td>".$langs->trans("PublicDonation")."</td><td>";
|
|
||||||
print $yn[$don->public];
|
|
||||||
print "</td></tr>\n";
|
|
||||||
|
|
||||||
print "<tr>".'<td>'.$langs->trans("Company").'</td><td>'.$don->societe.'</td></tr>';
|
|
||||||
print "<tr>".'<td>'.$langs->trans("Firstname").'</td><td>'.$don->prenom.'</td></tr>';
|
|
||||||
print "<tr>".'<td>'.$langs->trans("Lastname").'</td><td>'.$don->nom.'</td></tr>';
|
|
||||||
print "<tr>".'<td>'.$langs->trans("Address").'</td><td>'.nl2br($don->adresse).'</td></tr>';
|
|
||||||
print "<tr>".'<td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td>'.$don->cp.' '.$don->ville.'</td></tr>';
|
|
||||||
print "<tr>".'<td>'.$langs->trans("Country").'</td><td>'.$don->pays.'</td></tr>';
|
|
||||||
print "<tr>".'<td>'.$langs->trans("EMail").'</td><td>'.$don->email.'</td></tr>';
|
|
||||||
print "<tr>".'<td>'.$langs->trans("Amount").'</td><td>'.price($don->amount).' '.$langs->trans("Currency".$conf->monnaie).'</td></tr>';
|
|
||||||
print "<tr><td>".$langs->trans("PaymentMode")."</td><td>";
|
|
||||||
print $don->modepaiement;
|
|
||||||
print "</td></tr>\n";
|
|
||||||
|
|
||||||
print "</table>\n";
|
|
||||||
print "</form>\n";
|
|
||||||
|
|
||||||
print "</div>";
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Barre d'actions
|
* Barre d'actions
|
||||||
*/
|
*/
|
||||||
@@ -369,7 +394,7 @@ if ($_GET["rowid"] && $_GET["action"] != 'edit')
|
|||||||
|
|
||||||
if ($don->statut == 0)
|
if ($don->statut == 0)
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="fiche.php?rowid='.$don->id.'&action=valid_promesse">'.$langs->trans("Valid").'</a>';
|
print '<a class="butAction" href="fiche.php?rowid='.$don->id.'&action=valid_promesse">'.$langs->trans("ValidPromess").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// \todo G<>rer action <20>mettre paiement
|
// \todo G<>rer action <20>mettre paiement
|
||||||
@@ -385,7 +410,7 @@ if ($_GET["rowid"] && $_GET["action"] != 'edit')
|
|||||||
|
|
||||||
if ($don->statut == 2 || $don->statut == 3)
|
if ($don->statut == 2 || $don->statut == 3)
|
||||||
{
|
{
|
||||||
print "<a class=\"butAction\" href=\"formulaire/".DONS_FORM."?rowid=$don->id\">".$langs->trans("Form")."</a>";
|
print ' <a class="butAction" href="fiche.php?rowid='.$don->id.'&action=build">'.$langs->trans('BuildDoc').'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($don->statut == 0)
|
if ($don->statut == 0)
|
||||||
@@ -401,5 +426,6 @@ if ($_GET["rowid"] && $_GET["action"] != 'edit')
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
llxFooter('$Date$ - $Revision$');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -30,15 +30,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require('./pre.inc.php');
|
require('./pre.inc.php');
|
||||||
|
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/facture/modules_facture.php");
|
||||||
$user->getrights('facture');
|
|
||||||
$user->getrights('banque');
|
|
||||||
|
|
||||||
if (!$user->rights->facture->lire)
|
|
||||||
accessforbidden();
|
|
||||||
|
|
||||||
$langs->load('bills');
|
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/facture.class.php');
|
require_once(DOL_DOCUMENT_ROOT.'/facture.class.php');
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/paiement.class.php');
|
require_once(DOL_DOCUMENT_ROOT.'/paiement.class.php');
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/lib/CMailFile.class.php');
|
require_once(DOL_DOCUMENT_ROOT.'/lib/CMailFile.class.php');
|
||||||
@@ -47,6 +39,13 @@ if ($conf->propal->enabled) require_once(DOL_DOCUMENT_ROOT.'/propal.class.php'
|
|||||||
if ($conf->contrat->enabled) require_once(DOL_DOCUMENT_ROOT.'/contrat/contrat.class.php');
|
if ($conf->contrat->enabled) require_once(DOL_DOCUMENT_ROOT.'/contrat/contrat.class.php');
|
||||||
if ($conf->commande->enabled) require_once(DOL_DOCUMENT_ROOT.'/commande/commande.class.php');
|
if ($conf->commande->enabled) require_once(DOL_DOCUMENT_ROOT.'/commande/commande.class.php');
|
||||||
|
|
||||||
|
$user->getrights('facture');
|
||||||
|
$user->getrights('banque');
|
||||||
|
|
||||||
|
if (!$user->rights->facture->lire)
|
||||||
|
accessforbidden();
|
||||||
|
|
||||||
|
$langs->load('bills');
|
||||||
|
|
||||||
$sall=isset($_GET['sall'])?$_GET['sall']:$_POST['sall'];
|
$sall=isset($_GET['sall'])?$_GET['sall']:$_POST['sall'];
|
||||||
if (isset($_GET['msg'])) { $msg=urldecode($_GET['msg']); }
|
if (isset($_GET['msg'])) { $msg=urldecode($_GET['msg']); }
|
||||||
@@ -404,10 +403,7 @@ if ($_POST['action'] == 'confirm_canceled' && $_POST['confirm'] == 'yes')
|
|||||||
{
|
{
|
||||||
$fac = new Facture($db);
|
$fac = new Facture($db);
|
||||||
$fac->fetch($_GET['facid']);
|
$fac->fetch($_GET['facid']);
|
||||||
$result = $fac->set_canceled();
|
$result = $fac->set_canceled($user);
|
||||||
$_GET['facid'] = 0 ;
|
|
||||||
Header('Location: facture.php');
|
|
||||||
exit;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -552,8 +548,6 @@ if ($_POST['action'] == 'send' || $_POST['action'] == 'relance')
|
|||||||
*/
|
*/
|
||||||
if ($_GET['action'] == 'pdf')
|
if ($_GET['action'] == 'pdf')
|
||||||
{
|
{
|
||||||
// Generation de la facture d<>finie dans /includes/modules/facture/modules_facture.php
|
|
||||||
// G<>n<EFBFBD>re <20>galement le fichier meta dans le meme r<>pertoire (pour faciliter les recherches et indexation)
|
|
||||||
facture_pdf_create($db, $_GET['facid']);
|
facture_pdf_create($db, $_GET['facid']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2005 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
|
||||||
@@ -18,7 +18,6 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -36,60 +35,67 @@
|
|||||||
|
|
||||||
class Don
|
class Don
|
||||||
{
|
{
|
||||||
var $id;
|
var $id;
|
||||||
var $db;
|
var $db;
|
||||||
var $date;
|
var $date;
|
||||||
var $amount;
|
var $amount;
|
||||||
var $prenom;
|
var $prenom;
|
||||||
var $nom;
|
var $nom;
|
||||||
var $societe;
|
var $societe;
|
||||||
var $adresse;
|
var $adresse;
|
||||||
var $cp;
|
var $cp;
|
||||||
var $ville;
|
var $ville;
|
||||||
var $pays;
|
var $pays;
|
||||||
var $email;
|
var $email;
|
||||||
var $public;
|
var $public;
|
||||||
var $projetid;
|
var $projetid;
|
||||||
var $modepaiement;
|
var $modepaiement;
|
||||||
var $modepaiementid;
|
var $modepaiementid;
|
||||||
var $commentaire;
|
var $commentaire;
|
||||||
var $statut;
|
var $statut;
|
||||||
|
|
||||||
var $projet;
|
var $projet;
|
||||||
var $errorstr;
|
var $errorstr;
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Statut du don
|
* \brief Constructeur
|
||||||
* 0 : promesse non valid<69>e
|
* \param DB handler d'acc<63>s base
|
||||||
* 1 : promesse valid<69>e
|
* \param soc_idp id soci<63>t
|
||||||
* 2 : don valid<69>
|
*/
|
||||||
* 3 : don pay<61>
|
function Don($DB, $soc_idp="")
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* \brief Constructeur
|
|
||||||
* \param DB handler d'acc<63>s base
|
|
||||||
* \param soc_idp id soci<63>t<EFBFBD>
|
|
||||||
*/
|
|
||||||
function Don($DB, $soc_idp="")
|
|
||||||
{
|
{
|
||||||
$this->db = $DB ;
|
global $langs;
|
||||||
$this->modepaiementid = 0;
|
|
||||||
|
$this->db = $DB ;
|
||||||
|
$this->modepaiementid = 0;
|
||||||
|
|
||||||
|
$langs->load("donations");
|
||||||
|
$this->labelstatut[0]=$langs->trans("DonationStatusPromessNotValidated");
|
||||||
|
$this->labelstatut[1]=$langs->trans("DonationStatusPromessValidated");
|
||||||
|
$this->labelstatut[2]=$langs->trans("DonationStatusValidated");
|
||||||
|
$this->labelstatut[3]=$langs->trans("DonationStatusPayed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
/*
|
* \brief Retourne le libell<6C> du statut d'une propale (brouillon, valid<69>e, ...)
|
||||||
*
|
* \return string Libell<6C>
|
||||||
*/
|
*/
|
||||||
function print_error_list()
|
function getLibStatut()
|
||||||
{
|
{
|
||||||
|
return $this->labelstatut[$this->statut];
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function print_error_list()
|
||||||
|
{
|
||||||
$num = sizeof($this->errorstr);
|
$num = sizeof($this->errorstr);
|
||||||
for ($i = 0 ; $i < $num ; $i++)
|
for ($i = 0 ; $i < $num ; $i++)
|
||||||
{
|
{
|
||||||
print "<li>" . $this->errorstr[$i];
|
print "<li>" . $this->errorstr[$i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
@@ -277,53 +283,57 @@ class Don
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* \brief Charge l'objet don en m<>moire depuis la base de donn<6E>e
|
* \brief Charge l'objet don en m<>moire depuis la base de donn<6E>e
|
||||||
* \param rowid id du don <20> charger
|
* \param rowid Id du don <20> charger
|
||||||
*
|
* \return int <0 si ko, >0 si ok
|
||||||
*/
|
*/
|
||||||
function fetch($rowid)
|
function fetch($rowid)
|
||||||
{
|
{
|
||||||
$sql = "SELECT d.rowid, ".$this->db->pdate("d.datec")." as datec,";
|
$sql = "SELECT d.rowid, ".$this->db->pdate("d.datec")." as datec,";
|
||||||
$sql.= " ".$this->db->pdate("d.datedon")." as datedon,";
|
$sql.= " ".$this->db->pdate("d.datedon")." as datedon,";
|
||||||
$sql.= " d.prenom, d.nom, d.societe, d.amount, p.libelle as projet, d.fk_statut, d.adresse, d.cp, d.ville, d.pays, d.public, d.amount, d.fk_paiement, d.note, cp.libelle, d.email, d.fk_don_projet";
|
$sql.= " d.prenom, d.nom, d.societe, d.amount, p.libelle as projet, d.fk_statut, d.adresse, d.cp, d.ville, d.pays, d.public, d.amount, d.fk_paiement, d.note, cp.libelle, d.email, d.fk_don_projet";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."don as d, ".MAIN_DB_PREFIX."c_paiement as cp LEFT JOIN ".MAIN_DB_PREFIX."don_projet as p";
|
$sql.= " FROM ".MAIN_DB_PREFIX."c_paiement as cp, ".MAIN_DB_PREFIX."don as d";
|
||||||
$sql.= " ON p.rowid = d.fk_don_projet WHERE cp.id = d.fk_paiement AND d.rowid = $rowid";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."don_projet as p";
|
||||||
|
$sql.= " ON p.rowid = d.fk_don_projet";
|
||||||
if ( $this->db->query( $sql) )
|
$sql.= " WHERE cp.id = d.fk_paiement AND d.rowid = ".$rowid;
|
||||||
{
|
|
||||||
if ($this->db->num_rows())
|
|
||||||
{
|
|
||||||
|
|
||||||
$obj = $this->db->fetch_object();
|
|
||||||
|
|
||||||
$this->id = $obj->rowid;
|
|
||||||
$this->datec = $obj->datec;
|
|
||||||
$this->date = $obj->datedon;
|
|
||||||
$this->prenom = stripslashes($obj->prenom);
|
|
||||||
$this->nom = stripslashes($obj->nom);
|
|
||||||
$this->societe = stripslashes($obj->societe);
|
|
||||||
$this->statut = $obj->fk_statut;
|
|
||||||
$this->adresse = stripslashes($obj->adresse);
|
|
||||||
$this->cp = stripslashes($obj->cp);
|
|
||||||
$this->ville = stripslashes($obj->ville);
|
|
||||||
$this->email = stripslashes($obj->email);
|
|
||||||
$this->pays = stripslashes($obj->pays);
|
|
||||||
$this->projet = $obj->projet;
|
|
||||||
$this->projetid = $obj->fk_don_projet;
|
|
||||||
$this->public = $obj->public;
|
|
||||||
$this->modepaiementid = $obj->fk_paiement;
|
|
||||||
$this->modepaiement = $obj->libelle;
|
|
||||||
$this->amount = $obj->amount;
|
|
||||||
$this->commentaire = stripslashes($obj->note);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dolibarr_print_error($this->db);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
if ( $this->db->query( $sql) )
|
||||||
|
{
|
||||||
|
if ($this->db->num_rows())
|
||||||
|
{
|
||||||
|
|
||||||
|
$obj = $this->db->fetch_object();
|
||||||
|
|
||||||
|
$this->id = $obj->rowid;
|
||||||
|
$this->datec = $obj->datec;
|
||||||
|
$this->date = $obj->datedon;
|
||||||
|
$this->prenom = stripslashes($obj->prenom);
|
||||||
|
$this->nom = stripslashes($obj->nom);
|
||||||
|
$this->societe = stripslashes($obj->societe);
|
||||||
|
$this->statut = $obj->fk_statut;
|
||||||
|
$this->adresse = stripslashes($obj->adresse);
|
||||||
|
$this->cp = stripslashes($obj->cp);
|
||||||
|
$this->ville = stripslashes($obj->ville);
|
||||||
|
$this->email = stripslashes($obj->email);
|
||||||
|
$this->pays = stripslashes($obj->pays);
|
||||||
|
$this->projet = $obj->projet;
|
||||||
|
$this->projetid = $obj->fk_don_projet;
|
||||||
|
$this->public = $obj->public;
|
||||||
|
$this->modepaiementid = $obj->fk_paiement;
|
||||||
|
$this->modepaiement = $obj->libelle;
|
||||||
|
$this->amount = $obj->amount;
|
||||||
|
$this->commentaire = stripslashes($obj->note);
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dolibarr_print_error($this->db);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* \brief Valide une promesse de don
|
* \brief Valide une promesse de don
|
||||||
|
|||||||
@@ -767,7 +767,7 @@ class Facture
|
|||||||
dolibarr_syslog("Facture.class.php::set_canceled rowid=".$this->id);
|
dolibarr_syslog("Facture.class.php::set_canceled rowid=".$this->id);
|
||||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'facture';
|
$sql = 'UPDATE '.MAIN_DB_PREFIX.'facture';
|
||||||
$sql.= ' SET fk_statut=3 WHERE rowid = '.$this->id;
|
$sql.= ' SET fk_statut=3 WHERE rowid = '.$this->id;
|
||||||
$resql = $this->db->query( $sql);
|
$resql = $this->db->query($sql);
|
||||||
|
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
@@ -1376,7 +1376,7 @@ class Facture
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dolibarr_print_error($db,"modules_facture::getNextNumRef ".$obj->error);
|
dolibarr_print_error($db,"Facture::getNextNumRef ".$obj->error);
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,7 +111,24 @@ class ModeleNumRefCommandes
|
|||||||
return $langs->trans("NoExample");
|
return $langs->trans("NoExample");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** \brief Test si les num<75>ros d<>j<EFBFBD> en vigueur dans la base ne provoquent pas de
|
||||||
|
* de conflits qui empechera cette num<75>rotation de fonctionner.
|
||||||
|
* \return boolean false si conflit, true si ok
|
||||||
|
*/
|
||||||
|
function canBeActivated()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** \brief Renvoi prochaine valeur attribu<62>e
|
||||||
|
* \return string Valeur
|
||||||
|
*/
|
||||||
|
function getNextValue()
|
||||||
|
{
|
||||||
|
global $langs;
|
||||||
|
return $langs->trans("NotAvailable");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -29,6 +29,8 @@
|
|||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/facture/modules_facture.php");
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\class pdf_bernique
|
\class pdf_bernique
|
||||||
|
|||||||
@@ -28,6 +28,8 @@
|
|||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/facture/modules_facture.php");
|
||||||
|
|
||||||
|
|
||||||
/** \class pdf_bigorneau
|
/** \class pdf_bigorneau
|
||||||
\brief Classe permettant de g<>n<EFBFBD>rer les factures au mod<6F>le Bigorneau
|
\brief Classe permettant de g<>n<EFBFBD>rer les factures au mod<6F>le Bigorneau
|
||||||
|
|||||||
@@ -28,6 +28,8 @@
|
|||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/facture/modules_facture.php");
|
||||||
|
|
||||||
|
|
||||||
/** \class pdf_bulot
|
/** \class pdf_bulot
|
||||||
\brief Classe permettant de g<>n<EFBFBD>rer les factures au mod<6F>le Bulot
|
\brief Classe permettant de g<>n<EFBFBD>rer les factures au mod<6F>le Bulot
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/facture/modules_facture.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,8 @@
|
|||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/facture/modules_facture.php");
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\class pdf_huitre
|
\class pdf_huitre
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/facture/modules_facture.php");
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -28,6 +28,8 @@
|
|||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/facture/modules_facture.php");
|
||||||
|
|
||||||
|
|
||||||
/** \class pdf_tourteau
|
/** \class pdf_tourteau
|
||||||
\brief Classe permettant de g<>n<EFBFBD>rer les factures au mod<6F>le Tourteau
|
\brief Classe permettant de g<>n<EFBFBD>rer les factures au mod<6F>le Tourteau
|
||||||
|
|||||||
@@ -116,6 +116,24 @@ class ModeleNumRefFicheinter
|
|||||||
return $langs->trans("NoExample");
|
return $langs->trans("NoExample");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** \brief Test si les num<75>ros d<>j<EFBFBD> en vigueur dans la base ne provoquent pas de
|
||||||
|
* de conflits qui empechera cette num<75>rotation de fonctionner.
|
||||||
|
* \return boolean false si conflit, true si ok
|
||||||
|
*/
|
||||||
|
function canBeActivated()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** \brief Renvoi prochaine valeur attribu<62>e
|
||||||
|
* \return string Valeur
|
||||||
|
*/
|
||||||
|
function getNextValue()
|
||||||
|
{
|
||||||
|
global $langs;
|
||||||
|
return $langs->trans("NotAvailable");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2005 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
|
||||||
@@ -19,7 +19,6 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -119,6 +118,15 @@ class ModeleNumRefPropales
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** \brief Renvoi prochaine valeur attribu<62>e
|
||||||
|
* \return string Valeur
|
||||||
|
*/
|
||||||
|
function getNextValue()
|
||||||
|
{
|
||||||
|
global $langs;
|
||||||
|
return $langs->trans("NotAvailable");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,8 @@
|
|||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/propale/modules_propale.php");
|
||||||
|
|
||||||
|
|
||||||
/** \class pdf_propale_adytek
|
/** \class pdf_propale_adytek
|
||||||
\brief Classe permettant de g<>n<EFBFBD>rer les propales au mod<6F>le Adytek
|
\brief Classe permettant de g<>n<EFBFBD>rer les propales au mod<6F>le Adytek
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/propale/modules_propale.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,8 @@
|
|||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/propale/modules_propale.php");
|
||||||
|
|
||||||
|
|
||||||
/** \class pdf_propale_bleu
|
/** \class pdf_propale_bleu
|
||||||
\brief Classe permettant de g<>n<EFBFBD>rer les propales au mod<6F>le Bleu
|
\brief Classe permettant de g<>n<EFBFBD>rer les propales au mod<6F>le Bleu
|
||||||
|
|||||||
@@ -27,6 +27,8 @@
|
|||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/propale/modules_propale.php");
|
||||||
|
|
||||||
|
|
||||||
/** \class pdf_propale_jaune
|
/** \class pdf_propale_jaune
|
||||||
\brief Classe permettant de g<>n<EFBFBD>rer les propales au mod<6F>le Jaune
|
\brief Classe permettant de g<>n<EFBFBD>rer les propales au mod<6F>le Jaune
|
||||||
|
|||||||
@@ -28,6 +28,8 @@
|
|||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/propale/modules_propale.php");
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\class pdf_propale_rouge
|
\class pdf_propale_rouge
|
||||||
|
|||||||
@@ -28,6 +28,8 @@
|
|||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/propale/modules_propale.php");
|
||||||
|
|
||||||
|
|
||||||
/** \class pdf_propale_vert
|
/** \class pdf_propale_vert
|
||||||
\brief Classe permettant de g<>n<EFBFBD>rer les propales au mod<6F>le Vert
|
\brief Classe permettant de g<>n<EFBFBD>rer les propales au mod<6F>le Vert
|
||||||
|
|||||||
@@ -32,8 +32,6 @@ Send=Send
|
|||||||
SendRemind=Send reminder
|
SendRemind=Send reminder
|
||||||
DoPaiement=Do payment
|
DoPaiement=Do payment
|
||||||
DoPayment=Do payment
|
DoPayment=Do payment
|
||||||
BuildPDF=Build PDF
|
|
||||||
RebuildPDF=Rebuild PDF
|
|
||||||
VAT=VAT
|
VAT=VAT
|
||||||
VATRate=VAT Rate
|
VATRate=VAT Rate
|
||||||
Amount=Amount
|
Amount=Amount
|
||||||
|
|||||||
@@ -285,6 +285,10 @@ Internals=Internal
|
|||||||
Externals=External
|
Externals=External
|
||||||
Warning=Warning
|
Warning=Warning
|
||||||
Warnings=Warnings
|
Warnings=Warnings
|
||||||
|
BuildPDF=Build PDF
|
||||||
|
RebuildPDF=Rebuild PDF
|
||||||
|
BuildDoc=Build Doc
|
||||||
|
RebuildDoc=Rebuild Doc
|
||||||
# Countries
|
# Countries
|
||||||
CountryFR=France
|
CountryFR=France
|
||||||
CountryBE=Belgium
|
CountryBE=Belgium
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ CreateBill=Cr
|
|||||||
Send=Envoyer
|
Send=Envoyer
|
||||||
SendRemind=Envoyer un rappel
|
SendRemind=Envoyer un rappel
|
||||||
DoPaiement=Emettre un paiement
|
DoPaiement=Emettre un paiement
|
||||||
BuildPDF=G<>n<EFBFBD>rer le PDF
|
|
||||||
RebuildPDF=Reg<65>n<EFBFBD>rer le PDF
|
|
||||||
VAT=TVA
|
VAT=TVA
|
||||||
VATRate=Taux TVA
|
VATRate=Taux TVA
|
||||||
Amount=Montant
|
Amount=Montant
|
||||||
|
|||||||
@@ -32,8 +32,6 @@ Send=Envoyer
|
|||||||
SendRemind=Envoyer rappel
|
SendRemind=Envoyer rappel
|
||||||
DoPaiement=<3D>mettre paiement
|
DoPaiement=<3D>mettre paiement
|
||||||
DoPayment=<3D>mettre paiement
|
DoPayment=<3D>mettre paiement
|
||||||
BuildPDF=G<>n<EFBFBD>rer le PDF
|
|
||||||
RebuildPDF=Reg<65>n<EFBFBD>rer le PDF
|
|
||||||
VAT=TVA
|
VAT=TVA
|
||||||
VATRate=Taux TVA
|
VATRate=Taux TVA
|
||||||
Amount=Montant
|
Amount=Montant
|
||||||
|
|||||||
@@ -285,6 +285,10 @@ Internals=Internes
|
|||||||
Externals=Externes
|
Externals=Externes
|
||||||
Warning=Alerte
|
Warning=Alerte
|
||||||
Warnings=Alertes
|
Warnings=Alertes
|
||||||
|
BuildPDF=G<>n<EFBFBD>rer le PDF
|
||||||
|
RebuildPDF=Reg<65>n<EFBFBD>rer le PDF
|
||||||
|
BuildDoc=G<>n<EFBFBD>rer le doc
|
||||||
|
RebuildDoc=Reg<65>n<EFBFBD>rer le doc
|
||||||
# Countries
|
# Countries
|
||||||
CountryFR=France
|
CountryFR=France
|
||||||
CountryBE=Belgique
|
CountryBE=Belgique
|
||||||
|
|||||||
@@ -287,12 +287,18 @@ $conf->webcal->db->pass=defined('PHPWEBCALENDAR_PASS')?PHPWEBCALENDAR_PASS:'';
|
|||||||
$conf->webcal->db->name=defined('PHPWEBCALENDAR_DBNAME')?PHPWEBCALENDAR_DBNAME:'';
|
$conf->webcal->db->name=defined('PHPWEBCALENDAR_DBNAME')?PHPWEBCALENDAR_DBNAME:'';
|
||||||
|
|
||||||
$conf->facture->enabled=defined("MAIN_MODULE_FACTURE")?MAIN_MODULE_FACTURE:0;
|
$conf->facture->enabled=defined("MAIN_MODULE_FACTURE")?MAIN_MODULE_FACTURE:0;
|
||||||
if ($conf->facture->enabled) require_once(DOL_DOCUMENT_ROOT ."/includes/modules/facture/modules_facture.php");
|
// \todo Ajouter la ligne
|
||||||
|
// require_once(DOL_DOCUMENT_ROOT ."/includes/modules/facture/modules_facture.php");
|
||||||
|
// dans le fichier facturation-emission.php du module telephonie afin de pouvoir
|
||||||
|
// supprimer celles qui suivent.
|
||||||
|
if (defined("MAIN_MODULE_TELEPHONIE") && MAIN_MODULE_TELEPHONIE)
|
||||||
|
{
|
||||||
|
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/facture/modules_facture.php");
|
||||||
|
}
|
||||||
$conf->facture->dir_output=DOL_DATA_ROOT."/facture";
|
$conf->facture->dir_output=DOL_DATA_ROOT."/facture";
|
||||||
$conf->facture->dir_images=DOL_DATA_ROOT."/facture/images";
|
$conf->facture->dir_images=DOL_DATA_ROOT."/facture/images";
|
||||||
if (defined('FAC_OUTPUTDIR') && FAC_OUTPUTDIR) { $conf->facture->dir_output=FAC_OUTPUTDIR; } # Pour passer outre le rep par d?faut
|
if (defined('FAC_OUTPUTDIR') && FAC_OUTPUTDIR) { $conf->facture->dir_output=FAC_OUTPUTDIR; } # Pour passer outre le rep par d?faut
|
||||||
$conf->propal->enabled=defined("MAIN_MODULE_PROPALE")?MAIN_MODULE_PROPALE:0;
|
$conf->propal->enabled=defined("MAIN_MODULE_PROPALE")?MAIN_MODULE_PROPALE:0;
|
||||||
if ($conf->propal->enabled) require_once(DOL_DOCUMENT_ROOT ."/includes/modules/propale/modules_propale.php");
|
|
||||||
if (!defined("PROPALE_NEW_FORM_NB_PRODUCT")) define("PROPALE_NEW_FORM_NB_PRODUCT", 4);
|
if (!defined("PROPALE_NEW_FORM_NB_PRODUCT")) define("PROPALE_NEW_FORM_NB_PRODUCT", 4);
|
||||||
$conf->propal->dir_output=DOL_DATA_ROOT."/propale";
|
$conf->propal->dir_output=DOL_DATA_ROOT."/propale";
|
||||||
$conf->propal->dir_images=DOL_DATA_ROOT."/propale/images";
|
$conf->propal->dir_images=DOL_DATA_ROOT."/propale/images";
|
||||||
|
|||||||
Reference in New Issue
Block a user