Debug barcode module
This commit is contained in:
parent
2819aa1ed2
commit
79eb1e85a8
@ -23,7 +23,7 @@
|
|||||||
\ingroup barcode
|
\ingroup barcode
|
||||||
\brief Page d'administration/configuration du module Code barre
|
\brief Page d'administration/configuration du module Code barre
|
||||||
\version $Id$
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
|
||||||
@ -34,7 +34,7 @@ $dir = DOL_DOCUMENT_ROOT."/includes/modules/barcode/";
|
|||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
|
|
||||||
if (!$user->admin)
|
if (!$user->admin)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
if ($_POST["action"] == 'setcoder')
|
if ($_POST["action"] == 'setcoder')
|
||||||
{
|
{
|
||||||
@ -47,17 +47,23 @@ if ($_POST["action"] == 'setcoder')
|
|||||||
else if ($_POST["action"] == 'setgenbarcodelocation')
|
else if ($_POST["action"] == 'setgenbarcodelocation')
|
||||||
{
|
{
|
||||||
dolibarr_set_const($db, "GENBARCODE_LOCATION",$_POST["genbarcodelocation"]);
|
dolibarr_set_const($db, "GENBARCODE_LOCATION",$_POST["genbarcodelocation"]);
|
||||||
Header("Location: barcode.php");
|
}
|
||||||
exit;
|
else if ($_POST["action"] == 'setdefaultbarcodetype')
|
||||||
|
{
|
||||||
|
dolibarr_set_const($db, "PRODUIT_DEFAULT_BARCODE_TYPE", $_POST["coder_id"]);
|
||||||
|
}
|
||||||
|
else if ($_POST["action"] == 'GENBARCODE_BARCODETYPE_THIRDPARTY')
|
||||||
|
{
|
||||||
|
dolibarr_set_const($db, "GENBARCODE_BARCODETYPE_THIRDPARTY", $_POST["coder_id"]);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
else if ($_POST["action"] == 'setproductusebarcode')
|
else if ($_POST["action"] == 'setproductusebarcode')
|
||||||
{
|
{
|
||||||
dolibarr_set_const($db, "PRODUIT_USE_BARCODE",$_POST["value"]);
|
dolibarr_set_const($db, "PRODUIT_USE_BARCODE",$_POST["value"]);
|
||||||
Header("Location: barcode.php");
|
Header("Location: barcode.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
$html = new Form($db);
|
$html = new Form($db);
|
||||||
@ -153,7 +159,7 @@ if ($resql)
|
|||||||
{
|
{
|
||||||
$url=DOL_URL_ROOT.'/viewimage.php?modulepart=barcode&generator='.urlencode($obj->coder).'&code='.urlencode($obj->example).'&encoding='.urlencode($obj->encoding);
|
$url=DOL_URL_ROOT.'/viewimage.php?modulepart=barcode&generator='.urlencode($obj->coder).'&code='.urlencode($obj->example).'&encoding='.urlencode($obj->encoding);
|
||||||
//print $url;
|
//print $url;
|
||||||
print '<img src="'.$url.'" border="0">';
|
print '<img src="'.$url.'" title="'.$obj->example.'" border="0">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -213,27 +219,43 @@ if (!isset($_ENV['windir']) && !file_exists($_ENV['windir']))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Module produits
|
// Module produits
|
||||||
/*
|
if ($conf->societe->enabled)
|
||||||
if ($conf->produit->enabled)
|
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
|
||||||
print '<input type="hidden" name="action" value="setproductusebarcode">';
|
print "<input type=\"hidden\" name=\"action\" value=\"setdefaultbarcodetype\">";
|
||||||
print '<tr '.$bc[$var].'>';
|
print "<tr ".$bc[$var].">";
|
||||||
print '<td>'.$langs->trans("UseBarcodeInProductModule").'</td>';
|
print '<td>'.$langs->trans("SetDefaultBarcodeTypeProducts").'</td>';
|
||||||
print '<td width="60" align="right">';
|
print '<td width="60" align="right">';
|
||||||
print $html->selectyesno('value',$conf->global->PRODUIT_USE_BARCODE,1);
|
print $formbarcode->select_barcode_type($conf->global->PRODUIT_DEFAULT_BARCODE_TYPE,"coder_id",1);
|
||||||
print '</td>';
|
print '</td><td align="right">';
|
||||||
print '<td width="60" align="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||||
|
print "</td>";
|
||||||
|
print '</tr>';
|
||||||
|
print '</form>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Module produits
|
||||||
|
if ($conf->produit->enabled)
|
||||||
|
{
|
||||||
|
$var=!$var;
|
||||||
|
print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
|
||||||
|
print "<input type=\"hidden\" name=\"action\" value=\"GENBARCODE_BARCODETYPE_THIRDPARTY\">";
|
||||||
|
print "<tr ".$bc[$var].">";
|
||||||
|
print '<td>'.$langs->trans("SetDefaultBarcodeTypeThirdParties").'</td>';
|
||||||
|
print '<td width="60" align="right">';
|
||||||
|
print $formbarcode->select_barcode_type($conf->global->GENBARCODE_BARCODETYPE_THIRDPARTY,"coder_id",1);
|
||||||
|
print '</td><td align="right">';
|
||||||
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||||
|
print "</td>";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
//EAN13
|
//EAN13
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="100">';
|
print '<tr '.$bc[$var].'><td width="100">';
|
||||||
print "EAN13";
|
print "EAN13";
|
||||||
@ -252,7 +274,7 @@ print '</table>';
|
|||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
|
|
||||||
//UPC
|
//UPC
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="100">';
|
print '<tr '.$bc[$var].'><td width="100">';
|
||||||
print "UPC";
|
print "UPC";
|
||||||
@ -271,7 +293,7 @@ print '</table>';
|
|||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
|
|
||||||
//ISBN
|
//ISBN
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="100">';
|
print '<tr '.$bc[$var].'><td width="100">';
|
||||||
print "ISBN";
|
print "ISBN";
|
||||||
@ -287,7 +309,7 @@ print '</table>';
|
|||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
|
|
||||||
//code 39
|
//code 39
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="100">';
|
print '<tr '.$bc[$var].'><td width="100">';
|
||||||
print "Code 39";
|
print "Code 39";
|
||||||
@ -308,7 +330,7 @@ print '</table>';
|
|||||||
$i++;
|
$i++;
|
||||||
|
|
||||||
|
|
||||||
//code 128
|
//code 128
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="100">';
|
print '<tr '.$bc[$var].'><td width="100">';
|
||||||
print "Code 128";
|
print "Code 128";
|
||||||
@ -328,7 +350,7 @@ print '</table>';
|
|||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
|
|
||||||
//I25
|
//I25
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="100">';
|
print '<tr '.$bc[$var].'><td width="100">';
|
||||||
print "I25";
|
print "I25";
|
||||||
@ -343,7 +365,7 @@ print '</table>';
|
|||||||
print $formbarcode->setBarcodeEncoder('I25','form'.$i);
|
print $formbarcode->setBarcodeEncoder('I25','form'.$i);
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print "<br>";
|
print "<br>";
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
\ingroup produit
|
\ingroup produit
|
||||||
\brief Page d'administration/configuration du module Produit
|
\brief Page d'administration/configuration du module Produit
|
||||||
\version $Id$
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
|
||||||
@ -36,7 +36,7 @@ $langs->load("propal");
|
|||||||
$langs->load("products");
|
$langs->load("products");
|
||||||
|
|
||||||
if (!$user->admin)
|
if (!$user->admin)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
|
|
||||||
if ($_POST["action"] == 'nbprod')
|
if ($_POST["action"] == 'nbprod')
|
||||||
@ -128,10 +128,6 @@ else if ($_POST["action"] == 'useecotaxe')
|
|||||||
{
|
{
|
||||||
dolibarr_set_const($db, "PRODUIT_USE_ECOTAXE", $_POST["activate_useecotaxe"]);
|
dolibarr_set_const($db, "PRODUIT_USE_ECOTAXE", $_POST["activate_useecotaxe"]);
|
||||||
}
|
}
|
||||||
else if ($_POST["action"] == 'setdefaultbarcodetype')
|
|
||||||
{
|
|
||||||
dolibarr_set_const($db, "PRODUIT_DEFAULT_BARCODE_TYPE", $_POST["coder_id"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -276,22 +272,6 @@ print "</td>";
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
// Barcode
|
|
||||||
if ($conf->global->MAIN_MODULE_BARCODE)
|
|
||||||
{
|
|
||||||
$var=!$var;
|
|
||||||
print "<form method=\"post\" action=\"produit.php\">";
|
|
||||||
print "<input type=\"hidden\" name=\"action\" value=\"setdefaultbarcodetype\">";
|
|
||||||
print "<tr ".$bc[$var].">";
|
|
||||||
print '<td>'.$langs->trans("SetDefaultBarcodeType").'</td>';
|
|
||||||
print '<td width="60" align="right">';
|
|
||||||
print $formbarcode->select_barcode_type($conf->global->PRODUIT_DEFAULT_BARCODE_TYPE,"coder_id",1);
|
|
||||||
print '</td><td align="right">';
|
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
|
||||||
print "</td>";
|
|
||||||
print '</tr>';
|
|
||||||
print '</form>';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Only rodolphe and auguria menu manage canvas menu (auguria not correctly yet)
|
// Only rodolphe and auguria menu manage canvas menu (auguria not correctly yet)
|
||||||
if (eregi('^rodolphe',$conf->left_menu) || eregi('^auguria',$conf->left_menu))
|
if (eregi('^rodolphe',$conf->left_menu) || eregi('^auguria',$conf->left_menu))
|
||||||
|
|||||||
365
htdocs/compta/facture/retardspaiement.php
Normal file
365
htdocs/compta/facture/retardspaiement.php
Normal file
@ -0,0 +1,365 @@
|
|||||||
|
<?php
|
||||||
|
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
* Copyright (C) 2004 Éric Seigne <eric.seigne@ryxeo.com>
|
||||||
|
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
\file htdocs/compta/facture/retardspaiement.php
|
||||||
|
\ingroup facture
|
||||||
|
\brief Page de liste des factures clients impayées
|
||||||
|
\version $Revision$
|
||||||
|
*/
|
||||||
|
|
||||||
|
require("./pre.inc.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/facture.class.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/paiement.class.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/lib/files.lib.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/includes/fpdf/fpdfi/fpdi.php");
|
||||||
|
|
||||||
|
$langs->load("bills");
|
||||||
|
|
||||||
|
// Security check
|
||||||
|
$facid = isset($_GET["facid"])?$_GET["facid"]:'';
|
||||||
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
|
$result = restrictedArea($user, 'facture',$facid,'');
|
||||||
|
|
||||||
|
|
||||||
|
llxHeader('',$langs->trans("BillsLate"));
|
||||||
|
|
||||||
|
$html = new Form($db);
|
||||||
|
$formfile = new FormFile($db);
|
||||||
|
?><script type="text/javascript">
|
||||||
|
<!--
|
||||||
|
function checkall(checked){
|
||||||
|
var checkboxes = [];
|
||||||
|
checkboxes = $$('input').each(function(e){ if(e.type == 'checkbox') checkboxes.push(e) });
|
||||||
|
checkboxes.each(function(e){ e.checked = checked });
|
||||||
|
}
|
||||||
|
-->
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/***************************************************************************
|
||||||
|
* *
|
||||||
|
* Mode Liste *
|
||||||
|
* *
|
||||||
|
***************************************************************************/
|
||||||
|
$page = $_GET["page"];
|
||||||
|
$sortfield=$_GET["sortfield"];
|
||||||
|
$sortorder=$_GET["sortorder"];
|
||||||
|
if (! $sortfield) $sortfield="f.date_lim_reglement";
|
||||||
|
if (! $sortorder) $sortorder="ASC";
|
||||||
|
|
||||||
|
if ($user->rights->facture->lire)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
if ($_POST["action"] == "generate_pdf"){
|
||||||
|
if(is_array($_POST['toGenerate']))
|
||||||
|
{
|
||||||
|
|
||||||
|
$factures = dol_dir_list($conf->facture->dir_output,'all',1,implode('\.pdf|',$_POST['toGenerate']).'\.pdf','\.meta$|\.png','date',SORT_DESC) ;
|
||||||
|
|
||||||
|
// liste les fichiers
|
||||||
|
$files = array() ;
|
||||||
|
$factures_bak = $factures ;
|
||||||
|
foreach($_POST['toGenerate'] as $basename){
|
||||||
|
foreach($factures as $facture){
|
||||||
|
if(strstr($facture["name"],$basename)){
|
||||||
|
$files[] = DOL_DATA_ROOT . '/facture/' . $basename . '/' . $facture["name"] ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// génère le PDF à partir de tous les autres fichiers
|
||||||
|
$pdf=new FPDI();
|
||||||
|
foreach($files as $file){
|
||||||
|
// Charge un document PDF depuis un fichier.
|
||||||
|
$pagecount = $pdf->setSourceFile($file);
|
||||||
|
for ($i = 1; $i <= $pagecount; $i++) {
|
||||||
|
$tplidx = $pdf->ImportPage($i);
|
||||||
|
$s = $pdf->getTemplatesize($tplidx);
|
||||||
|
$pdf->AddPage($s['h'] > $s['w'] ? 'P' : 'L');
|
||||||
|
$pdf->useTemplate($tplidx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// vérifie que le chemin d'accès est bien accessible
|
||||||
|
if(!is_dir(DOL_DATA_ROOT . '/facture/impayes')) mkdir(DOL_DATA_ROOT . '/facture/impayes') ;
|
||||||
|
|
||||||
|
// enregistre le fichier pdf concaténé
|
||||||
|
$pdf->Output( DOL_DATA_ROOT . '/facture/impayes/impayes '.dolibarr_date('Y-m-d H:i:s',time()).'.pdf');
|
||||||
|
|
||||||
|
} else {
|
||||||
|
print '<div class="error">'.$langs->trans('UnpayedNotChecked').'</div>' ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$limit = $conf->liste_limit;
|
||||||
|
$offset = $limit * $page ;
|
||||||
|
|
||||||
|
$sql = "SELECT s.nom, s.rowid as socid";
|
||||||
|
$sql.= ", f.facnumber,f.increment,f.total as total_ht,f.total_ttc";
|
||||||
|
$sql.= ", ".$db->pdate("f.datef")." as df, ".$db->pdate("f.date_lim_reglement")." as datelimite";
|
||||||
|
$sql.= ", f.paye as paye, f.rowid as facid, f.fk_statut";
|
||||||
|
$sql.= ", sum(pf.amount) as am";
|
||||||
|
if (! $user->rights->societe->client->voir && ! $socid) $sql .= ", sc.fk_soc, sc.fk_user ";
|
||||||
|
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||||
|
if (! $user->rights->societe->client->voir && ! $socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
|
$sql.= ",".MAIN_DB_PREFIX."facture as f";
|
||||||
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON f.rowid=pf.fk_facture ";
|
||||||
|
$sql.= " WHERE f.fk_soc = s.rowid";
|
||||||
|
$sql.= " AND f.paye = 0 AND f.fk_statut = 1 AND f.date_lim_reglement < NOW()";
|
||||||
|
if (! $user->rights->societe->client->voir && ! $socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||||
|
if ($socid) $sql .= " AND s.rowid = ".$socid;
|
||||||
|
|
||||||
|
if ($_GET["filtre"])
|
||||||
|
{
|
||||||
|
$filtrearr = split(",", $_GET["filtre"]);
|
||||||
|
foreach ($filtrearr as $fil)
|
||||||
|
{
|
||||||
|
$filt = split(":", $fil);
|
||||||
|
$sql .= " AND " . $filt[0] . " = " . $filt[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($_GET["search_ref"])
|
||||||
|
{
|
||||||
|
$sql .= " AND f.facnumber like '%".$_GET["search_ref"]."%'";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($_GET["search_societe"])
|
||||||
|
{
|
||||||
|
$sql .= " AND s.nom like '%".$_GET["search_societe"]."%'";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($_GET["search_montant_ht"])
|
||||||
|
{
|
||||||
|
$sql .= " AND f.total = '".$_GET["search_montant_ht"]."'";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($_GET["search_montant_ttc"])
|
||||||
|
{
|
||||||
|
$sql .= " AND f.total_ttc = '".$_GET["search_montant_ttc"]."'";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strlen($_POST["sf_ref"]) > 0)
|
||||||
|
{
|
||||||
|
$sql .= " AND f.facnumber like '%".$_POST["sf_ref"] . "%'";
|
||||||
|
}
|
||||||
|
$sql.= " GROUP BY f.facnumber";
|
||||||
|
|
||||||
|
$sql.= " ORDER BY ";
|
||||||
|
$listfield=split(',',$sortfield);
|
||||||
|
foreach ($listfield as $key => $value) $sql.=$listfield[$key]." ".$sortorder.",";
|
||||||
|
$sql.= " f.facnumber DESC";
|
||||||
|
|
||||||
|
//$sql .= $db->plimit($limit+1,$offset);
|
||||||
|
|
||||||
|
$result = $db->query($sql);
|
||||||
|
|
||||||
|
if ($result)
|
||||||
|
{
|
||||||
|
$num = $db->num_rows($result);
|
||||||
|
|
||||||
|
if ($socid)
|
||||||
|
{
|
||||||
|
$soc = new Societe($db);
|
||||||
|
$soc->fetch($socid);
|
||||||
|
}
|
||||||
|
|
||||||
|
$titre=($socid?$langs->trans("BillsCustomersUnpayedForCompany",$soc->nom):$langs->trans("BillsLate"));
|
||||||
|
print_barre_liste($titre,$page,"retardspaiement.php","&socid=$socid",$sortfield,$sortorder,'',0); // We don't want pagination on this page
|
||||||
|
$i = 0;
|
||||||
|
print '<table class="liste" width="100%">';
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
|
||||||
|
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"f.facnumber","","&socid=$socid","",$sortfield,$sortorder);
|
||||||
|
print_liste_field_titre($langs->trans("Generate"),$_SERVER["PHP_SELF"],"");
|
||||||
|
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"f.datef","","&socid=$socid",'align="center"',$sortfield,$sortorder);
|
||||||
|
print_liste_field_titre($langs->trans("DateDue"),$_SERVER["PHP_SELF"],"f.date_lim_reglement","","&socid=$socid",'align="center"',$sortfield,$sortorder);
|
||||||
|
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&socid=$socid","",$sortfield,$sortorder);
|
||||||
|
print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.total","","&socid=$socid",'align="right"',$sortfield,$sortorder);
|
||||||
|
print_liste_field_titre($langs->trans("AmountTTC"),$_SERVER["PHP_SELF"],"f.total_ttc","","&socid=$socid",'align="right"',$sortfield,$sortorder);
|
||||||
|
print_liste_field_titre($langs->trans("Received"),$_SERVER["PHP_SELF"],"am","","&socid=$socid",'align="right"',$sortfield,$sortorder);
|
||||||
|
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"fk_statut,paye,am","","&socid=$socid",'align="right"',$sortfield,$sortorder);
|
||||||
|
print "</tr>\n";
|
||||||
|
|
||||||
|
// Lignes des champs de filtre
|
||||||
|
print '<form method="get" action="retardspaiement.php">';
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
print '<td class="liste_titre" valign="right">';
|
||||||
|
print '<input class="flat" size="10" type="text" name="search_ref" value="'.$_GET["search_ref"].'"></td>';
|
||||||
|
print '<td class="liste_titre" align="center"><input type="checkbox" onclick="checkall(this.checked);"></td>';
|
||||||
|
print '<td class="liste_titre"> </td>';
|
||||||
|
print '<td class="liste_titre"> </td>';
|
||||||
|
print '<td class="liste_titre" align="left">';
|
||||||
|
print '<input class="flat" type="text" name="search_societe" value="'.$_GET["search_societe"].'">';
|
||||||
|
print '</td><td class="liste_titre" align="right">';
|
||||||
|
print '<input class="flat" type="text" size="10" name="search_montant_ht" value="'.$_GET["search_montant_ht"].'">';
|
||||||
|
print '</td><td class="liste_titre" align="right">';
|
||||||
|
print '<input class="flat" type="text" size="10" name="search_montant_ttc" value="'.$_GET["search_montant_ttc"].'">';
|
||||||
|
print '</td><td class="liste_titre" colspan="2" align="right">';
|
||||||
|
print '<input type="image" class="liste_titre" name="button_search" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" alt="'.$langs->trans("Search").'">';
|
||||||
|
print '</td>';
|
||||||
|
print "</tr>\n";
|
||||||
|
print '</form>';
|
||||||
|
|
||||||
|
|
||||||
|
$facturestatic=new Facture($db);
|
||||||
|
|
||||||
|
if ($num > 0)
|
||||||
|
{
|
||||||
|
$var=True;
|
||||||
|
$total_ht=0;
|
||||||
|
$total_ttc=0;
|
||||||
|
$total_payed=0;
|
||||||
|
|
||||||
|
print '<form id="form_generate_pdf" method="post" action="retardspaiement.php?sortfield='. $_GET['sortfield'] .'&sortorder='. $_GET['sortorder'] .'">';
|
||||||
|
print '<input type="hidden" name="action" value="generate_pdf">';
|
||||||
|
|
||||||
|
while ($i < $num)
|
||||||
|
{
|
||||||
|
$objp = $db->fetch_object($result);
|
||||||
|
|
||||||
|
$var=!$var;
|
||||||
|
|
||||||
|
print "<tr $bc[$var]>";
|
||||||
|
$class = "impayee";
|
||||||
|
|
||||||
|
print '<td nowrap="nowrap">';
|
||||||
|
|
||||||
|
$facturestatic->id=$objp->facid;
|
||||||
|
$facturestatic->ref=$objp->facnumber;
|
||||||
|
$facturestatic->type=$objp->type;
|
||||||
|
|
||||||
|
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||||
|
print '<td width="90" class="nobordernopadding" nowrap="nowrap">';
|
||||||
|
print $facturestatic->getNomUrl(1);
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
|
print '<td width="20" class="nobordernopadding" nowrap="nowrap">';
|
||||||
|
if ($objp->datelimite < (time() - $conf->facture->client->warning_delay) && ! $objp->paye && $objp->fk_statut == 1) print img_warning($langs->trans("Late"));
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
|
print '<td width="16" align="right" class="nobordernopadding">';
|
||||||
|
|
||||||
|
$filename=sanitize_string($objp->facnumber);
|
||||||
|
$filedir=$conf->facture->dir_output . '/' . sanitize_string($objp->facnumber);
|
||||||
|
$urlsource=$_SERVER['PHP_SELF'].'?facid='.$objp->facid;
|
||||||
|
$formfile->show_documents('facture',$filename,$filedir,$urlsource,'','','','','',1);
|
||||||
|
|
||||||
|
print '</td></tr></table>';
|
||||||
|
|
||||||
|
print '<td align="center"><input id="cb'.$objp->facid.'" type="checkbox" name="toGenerate[]" value="'.$objp->facnumber.'"></td>' ;
|
||||||
|
|
||||||
|
print "</td>\n";
|
||||||
|
|
||||||
|
print "<td nowrap align=\"center\">".dolibarr_print_date($objp->df)."</td>\n";
|
||||||
|
print "<td nowrap align=\"center\">".dolibarr_print_date($objp->datelimite)."</td>\n";
|
||||||
|
|
||||||
|
print '<td><a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($objp->nom,32).'</a></td>';
|
||||||
|
|
||||||
|
print "<td align=\"right\">".price($objp->total_ht)."</td>";
|
||||||
|
print "<td align=\"right\">".price($objp->total_ttc)."</td>";
|
||||||
|
print "<td align=\"right\">".price($objp->am)."</td>";
|
||||||
|
|
||||||
|
// Affiche statut de la facture
|
||||||
|
print '<td align="right" nowrap="nowrap">';
|
||||||
|
print $facturestatic->LibStatut($objp->paye,$objp->fk_statut,5,$objp->am);
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
|
print "</tr>\n";
|
||||||
|
$total_ht+=$objp->total_ht;
|
||||||
|
$total_ttc+=$objp->total_ttc;
|
||||||
|
$total_payed+=$objp->am;
|
||||||
|
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
print '<tr class="liste_total">';
|
||||||
|
print "<td colspan=\"4\" align=\"left\">".$langs->trans("Total").": </td>";
|
||||||
|
print "<td align=\"right\"><b>".price($total_ht)."</b></td>";
|
||||||
|
print "<td align=\"right\"><b>".price($total_ttc)."</b></td>";
|
||||||
|
print "<td align=\"right\"><b>".price($total_payed)."</b></td>";
|
||||||
|
print '<td align="center"> </td>';
|
||||||
|
print "</tr>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
print "</table>";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Gestion des documents générés
|
||||||
|
*/
|
||||||
|
$filedir=$conf->facture->dir_output . '/impayes';
|
||||||
|
$urlsource=$_SERVER['PHP_SELF'].'?facid='.$fac->id;
|
||||||
|
$genallowed=$user->rights->facture->creer;
|
||||||
|
$delallowed=$user->rights->facture->supprimer;
|
||||||
|
|
||||||
|
//class="pair" ou "impair" pour les tr
|
||||||
|
$var = false ; $bc = array("pair","impair") ;
|
||||||
|
|
||||||
|
// liste des fichier
|
||||||
|
$file_list=dol_dir_list($filedir,'files',0,'impayes.*','\.meta$','date',SORT_DESC);;
|
||||||
|
|
||||||
|
print '<br>' ;
|
||||||
|
print_titre($langs->trans("Documents"));
|
||||||
|
print '<table class="border" width="60%">';
|
||||||
|
print '<tr class="liste_titre">' ;
|
||||||
|
print '<td align="center">'.$langs->trans("File").'</td><td align="center" width="20%">'.$langs->trans("Size").'</td><td align="center" width="20%">'.$langs->trans("Date").'</td><td align="center" width="20%"><input type="submit" value="'.$langs->trans("Generate").'"></td>' ;
|
||||||
|
print '</tr>' ;
|
||||||
|
// Pour chaque fichier on affiche une ligne
|
||||||
|
foreach($file_list as $file){
|
||||||
|
$filepath = $filedir."/".$file["name"] ;
|
||||||
|
$var = !$var ;
|
||||||
|
print '<tr class="'.$bc[$var].'">' ;
|
||||||
|
// Nom du fichier
|
||||||
|
print '<td><a href="'.DOL_URL_ROOT . '/document.php?modulepart=impayes&file='.urlencode($filepath).'">'.img_pdf($file["name"],2)." ".$file["name"].'</td>' ;
|
||||||
|
// Taille
|
||||||
|
print '<td align="center" width="20%">'.filesize($filepath). ' bytes</td>' ;
|
||||||
|
// Date
|
||||||
|
print '<td align="center" width="20%">'.dolibarr_print_date(filemtime($filepath),'dayhour').'</td>' ;
|
||||||
|
// Suppression
|
||||||
|
print '<td align="center" width="20%"><a href="'.DOL_URL_ROOT.'/document.php?action=remove_file&modulepart=impayes&file='.urlencode($filepath).'&urlsource='.urlencode($urlsource).'">'.img_delete().'</a></td>' ;
|
||||||
|
print '</tr>' ;
|
||||||
|
}
|
||||||
|
|
||||||
|
print '</table>';
|
||||||
|
|
||||||
|
print '</form>';
|
||||||
|
|
||||||
|
$db->free();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dolibarr_print_error($db);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$db->close();
|
||||||
|
|
||||||
|
llxFooter('$Date$ - $Revision$');
|
||||||
|
?>
|
||||||
@ -109,6 +109,16 @@ if ($modulepart)
|
|||||||
$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."facture WHERE ref='$refname'";
|
$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."facture WHERE ref='$refname'";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($modulepart == 'impayes')
|
||||||
|
{
|
||||||
|
$user->getrights('facture');
|
||||||
|
if ($user->rights->facture->lire || eregi('^specimen',$original_file))
|
||||||
|
{
|
||||||
|
$accessallowed=1;
|
||||||
|
}
|
||||||
|
$original_file=$original_file;
|
||||||
|
}
|
||||||
|
|
||||||
// Wrapping pour les fiches intervention
|
// Wrapping pour les fiches intervention
|
||||||
if ($modulepart == 'ficheinter')
|
if ($modulepart == 'ficheinter')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -26,7 +26,7 @@
|
|||||||
\ingroup product
|
\ingroup product
|
||||||
\brief Page de la fiche produit
|
\brief Page de la fiche produit
|
||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
||||||
@ -90,8 +90,8 @@ if ($_POST["action"] == 'add' && $user->rights->produit->creer)
|
|||||||
|
|
||||||
// Action mise a jour d'un produit ou service
|
// Action mise a jour d'un produit ou service
|
||||||
if ($_POST["action"] == 'update' &&
|
if ($_POST["action"] == 'update' &&
|
||||||
$_POST["cancel"] <> $langs->trans("Cancel") &&
|
$_POST["cancel"] <> $langs->trans("Cancel") &&
|
||||||
$user->rights->produit->creer)
|
$user->rights->produit->creer)
|
||||||
{
|
{
|
||||||
$product = new Product($db);
|
$product = new Product($db);
|
||||||
if ($product->fetch($_POST["id"]))
|
if ($product->fetch($_POST["id"]))
|
||||||
@ -165,7 +165,7 @@ if ($_GET["action"] == 'remove_fourn')
|
|||||||
|
|
||||||
|
|
||||||
if ($_POST["action"] == 'update_price' &&
|
if ($_POST["action"] == 'update_price' &&
|
||||||
$_POST["cancel"] <> $langs->trans("Cancel") && $user->rights->produit->creer)
|
$_POST["cancel"] <> $langs->trans("Cancel") && $user->rights->produit->creer)
|
||||||
{
|
{
|
||||||
$product = new Product($db);
|
$product = new Product($db);
|
||||||
|
|
||||||
|
|||||||
@ -111,7 +111,7 @@ if ($_GET["id"])
|
|||||||
* Ajouter une photo
|
* Ajouter une photo
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
if ($_GET["action"] == 'ajout_photo' && $user->rights->produit->creer && $product->isproduct() && $conf->upload)
|
if ($_GET["action"] == 'ajout_photo' && $user->rights->produit->creer && $conf->upload)
|
||||||
{
|
{
|
||||||
print_titre($langs->trans("AddPhoto"));
|
print_titre($langs->trans("AddPhoto"));
|
||||||
|
|
||||||
@ -195,7 +195,7 @@ if ($_GET["id"])
|
|||||||
|
|
||||||
if ($_GET["action"] == '')
|
if ($_GET["action"] == '')
|
||||||
{
|
{
|
||||||
if ( $user->rights->produit->creer && $product->isproduct() && $conf->upload)
|
if ( $user->rights->produit->creer && $conf->upload)
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="photos.php?action=ajout_photo&id='.$product->id.'">';
|
print '<a class="butAction" href="photos.php?action=ajout_photo&id='.$product->id.'">';
|
||||||
print $langs->trans("AddPhoto").'</a>';
|
print $langs->trans("AddPhoto").'</a>';
|
||||||
|
|||||||
@ -425,6 +425,8 @@ class MenuLeft {
|
|||||||
}
|
}
|
||||||
if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/facture/impayees.php?leftmenu=customers_bills",$langs->trans("Unpayed"),2,$user->rights->facture->lire);
|
if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/facture/impayees.php?leftmenu=customers_bills",$langs->trans("Unpayed"),2,$user->rights->facture->lire);
|
||||||
|
|
||||||
|
if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/facture/retardspaiement.php?leftmenu=customers_bills",$langs->trans("BillsLate"),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?leftmenu=customers_bills_payments",$langs->trans("MenuToValid"),3,$user->rights->facture->lire);
|
if (eregi("customers_bills_payments",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/avalider.php?leftmenu=customers_bills_payments",$langs->trans("MenuToValid"),3,$user->rights->facture->lire);
|
||||||
|
|||||||
@ -826,7 +826,8 @@ ModifyProductDescAbility=Personalization of descriptions produced in the forms
|
|||||||
ViewProductDescInFormAbility=Visualization of product descriptions in the forms (otherwise as popup tooltip)
|
ViewProductDescInFormAbility=Visualization of product descriptions in the forms (otherwise as popup tooltip)
|
||||||
UseSearchToSelectProduct=Use a search form to choose a product (intead of using a list box)
|
UseSearchToSelectProduct=Use a search form to choose a product (intead of using a list box)
|
||||||
UseEcoTaxeAbility=Support Eco-Taxe (WEEE)
|
UseEcoTaxeAbility=Support Eco-Taxe (WEEE)
|
||||||
SetDefaultBarcodeType=Default barcode type to use for products
|
SetDefaultBarcodeTypeProducts=Default barcode type to use for products
|
||||||
|
SetDefaultBarcodeTypeThirdParties=Default barcode type to use for third parties
|
||||||
##### Syslog #####
|
##### Syslog #####
|
||||||
SyslogSetup=Syslog module setup
|
SyslogSetup=Syslog module setup
|
||||||
SyslogOutput=Log output
|
SyslogOutput=Log output
|
||||||
|
|||||||
@ -930,7 +930,7 @@ ModifyProductDescAbility=Personalizaci
|
|||||||
ViewProductDescInFormAbility=Visualización de las descripciones de los productos en los formularios
|
ViewProductDescInFormAbility=Visualización de las descripciones de los productos en los formularios
|
||||||
UseSearchToSelectProduct=Utilizar un formulario de búsqueda para la selección de un producto (en vez de la lista desplegable)
|
UseSearchToSelectProduct=Utilizar un formulario de búsqueda para la selección de un producto (en vez de la lista desplegable)
|
||||||
UseEcoTaxeAbility=Asumir ecotasa (DEEE)
|
UseEcoTaxeAbility=Asumir ecotasa (DEEE)
|
||||||
SetDefaultBarcodeType=tipo códigos de barra utiliazdos por defecto para los productos
|
SetDefaultBarcodeTypeProducts=tipo códigos de barra utiliazdos por defecto para los productos
|
||||||
##### Suppliers #####
|
##### Suppliers #####
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -826,7 +826,8 @@ ViewProductDescInFormAbility=Visualisation des descriptions produits dans les fo
|
|||||||
UseSearchToSelectProduct=Utiliser un formulaire de recherche pour choix d'un produit (plutôt que liste déroulante)
|
UseSearchToSelectProduct=Utiliser un formulaire de recherche pour choix d'un produit (plutôt que liste déroulante)
|
||||||
UseEcoTaxeAbility=Prise en charge des éco-taxes (DEEE)
|
UseEcoTaxeAbility=Prise en charge des éco-taxes (DEEE)
|
||||||
UseMinPrice=Utilisation d'un prix minimum de vente
|
UseMinPrice=Utilisation d'un prix minimum de vente
|
||||||
SetDefaultBarcodeType=Type de code barre utilisé par défaut pour les produits
|
SetDefaultBarcodeTypeProducts=Type de code barre utilisé par défaut pour les produits
|
||||||
|
SetDefaultBarcodeTypeThirdParties=Type de code barre utilisé par défaut pour les tiers
|
||||||
##### Suppliers #####
|
##### Suppliers #####
|
||||||
SuppliersSetup=Configuration du module Fournisseur
|
SuppliersSetup=Configuration du module Fournisseur
|
||||||
##### Syslog #####
|
##### Syslog #####
|
||||||
|
|||||||
@ -7,6 +7,7 @@ BillsCustomersUnpayed=Factures clients impay
|
|||||||
BillsCustomersUnpayedForCompany=Factures clients impayées pour %s
|
BillsCustomersUnpayedForCompany=Factures clients impayées pour %s
|
||||||
BillsSuppliersUnpayed=Factures fournisseurs impayées
|
BillsSuppliersUnpayed=Factures fournisseurs impayées
|
||||||
BillsUnpayed=Impayées
|
BillsUnpayed=Impayées
|
||||||
|
BillsLate=Retards de paiement
|
||||||
BillsStatistics=Statistiques factures
|
BillsStatistics=Statistiques factures
|
||||||
InvoiceStandard=Facture standard
|
InvoiceStandard=Facture standard
|
||||||
InvoiceStandardAsk=Facture standard
|
InvoiceStandardAsk=Facture standard
|
||||||
@ -233,6 +234,7 @@ InvoicePayed=Facture pay
|
|||||||
PaymentNumber=Numéro paiement
|
PaymentNumber=Numéro paiement
|
||||||
RemoveDiscount=Supprimer remise
|
RemoveDiscount=Supprimer remise
|
||||||
WatermarkOnDraftBill=Filigrane sur les brouillons de factures (aucun si vide)
|
WatermarkOnDraftBill=Filigrane sur les brouillons de factures (aucun si vide)
|
||||||
|
UnpayedNotChecked=Aucune facture impayées n'a été sélectionnée
|
||||||
|
|
||||||
# PaymentConditions
|
# PaymentConditions
|
||||||
PaymentConditionShortRECEP=A réception
|
PaymentConditionShortRECEP=A réception
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
\file htdocs/lib/product.lib.php
|
\file htdocs/lib/product.lib.php
|
||||||
\brief Ensemble de fonctions de base pour le module produit et service
|
\brief Ensemble de fonctions de base pour le module produit et service
|
||||||
\version $Id$
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function product_prepare_head($product, $user)
|
function product_prepare_head($product, $user)
|
||||||
{
|
{
|
||||||
@ -55,7 +55,7 @@ function product_prepare_head($product, $user)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Affichage onglet code barre
|
// Affichage onglet code barre
|
||||||
if ($conf->global->MAIN_MODULE_BARCODE && $product->isproduct() && $user->rights->barcode->lire)
|
if ($conf->global->MAIN_MODULE_BARCODE)
|
||||||
{
|
{
|
||||||
$head[$h][0] = DOL_URL_ROOT."/product/barcode.php?id=".$product->id;
|
$head[$h][0] = DOL_URL_ROOT."/product/barcode.php?id=".$product->id;
|
||||||
$head[$h][1] = $langs->trans("BarCode");
|
$head[$h][1] = $langs->trans("BarCode");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user