New: Add graph for orders.
This commit is contained in:
parent
4b5c1830b1
commit
5a6221629e
29
ChangeLog
29
ChangeLog
@ -15,44 +15,47 @@ For users:
|
||||
(Save 2 clicks).
|
||||
- In commercial main menu, left menu are already opened. This save one click
|
||||
to open a proposal or order.
|
||||
- New: First graph using javascripts.
|
||||
- New: Can add a discount for third party, during invoice edition (and we
|
||||
saved clicks again).
|
||||
- New: Add status for third parties.
|
||||
- Can add a discount for third party, during invoice edition (and we
|
||||
saved clicks again).
|
||||
- New: Add graph using Jquery Flot.
|
||||
- New: Usage of Jquery Notify to show result or error messages on action.
|
||||
- New: Add status for third parties to disable a third party.
|
||||
- New: Can send interventions cards by email.
|
||||
- New: Add option MAIN_FIRST_TO_UPPER to force upper case of first
|
||||
letters for names and firstname.
|
||||
- New: Can filter of payment type in bank transaction list.
|
||||
- New: Status is visible into user list.
|
||||
- New: Status of users is visible into user list.
|
||||
- New: Support BSB code for bank account in australia.
|
||||
- New: Can set date of payment for autocreate invoice/payment when
|
||||
creating a foundation subscription.
|
||||
- New: Can edit note of payment.
|
||||
- New: Login is not mandatory in member module.
|
||||
- New: Add box last members for foundation module.
|
||||
- New: A specialized menu is now used when using smartphones.
|
||||
- New: Add box for last members for foundation module.
|
||||
- New: A specialized menu can now be used when using smartphones.
|
||||
- New: Can add information on current user on odt generation
|
||||
- New: Prefix on third party is not used by default. Hidden option
|
||||
SOCIETE_USEPREFIX can restore old feature.
|
||||
- New: Standing orders module use bank account from banks module.
|
||||
- New: Ask password when creating a user from a contact.
|
||||
- New: task #10577: Use a numbering module for shipment and contract
|
||||
- New: task #10577: Use a numbering module for shipment and contract.
|
||||
- New: Can create manually order from proposal.
|
||||
- New: Add a first workflow module to create automatic action on some
|
||||
events (create order on proposal closing).
|
||||
- New: Can create manually order from proposal.
|
||||
- New: Use autocompletion on invoice select when creating replacement
|
||||
or credit note invoice.
|
||||
- New: task #10885: Add a week view for calendar
|
||||
- New: task #11018 : Add a status "not applicable" on event
|
||||
- New: task #10885: Add a week view for calendar.
|
||||
- New: task #11018: Add a status "not applicable" on events.
|
||||
- New: Add country/region/town statistics for member module.
|
||||
- New: Can define a proxy for external web access.
|
||||
- New: task #11003: checkbox on checks to deposit
|
||||
- New: Numbering module for invoice use same number for invoice
|
||||
and credit note if mask is same.
|
||||
- New: Add status into export. Add default language into export.
|
||||
- New: Can remove a project if project has tasks.
|
||||
- New: Can filter on date when building cheque receipts.
|
||||
- New: Paypal module can show paypal list of transaction and convert one
|
||||
into an order.
|
||||
- Fix: Better Postgresql compatibility.
|
||||
- Fix: Numbering module for invoices use same number for invoice
|
||||
and credit note if mask is same.
|
||||
|
||||
For developers:
|
||||
- New: External modules can add tabs on agenda views.
|
||||
|
||||
@ -136,50 +136,58 @@ print $langs->trans("Other").':</td><td><input type="text" name="sall" class="fl
|
||||
print '</td></tr>';
|
||||
print "</table></form>";
|
||||
|
||||
print '<br>';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Statistics").'</td></tr>';
|
||||
print '<tr><td align="center">';
|
||||
|
||||
$SommeA=0;
|
||||
$SommeB=0;
|
||||
$SommeC=0;
|
||||
$SommeD=0;
|
||||
$dataval=array();
|
||||
$datalabels=array();
|
||||
$dataseries=array();
|
||||
foreach ($AdherentType as $key => $adhtype)
|
||||
{
|
||||
$datalabels[]=$adhtype->getNomUrl(0,dol_size(16));
|
||||
$dataval['draft'][]=isset($MemberToValidate[$key])?$MemberToValidate[$key]:0;
|
||||
$dataval['notuptodate'][]=isset($MembersValidated[$key])?$MembersValidated[$key]-$MemberUpToDate[$key]:0;
|
||||
$dataval['uptodate'][]=isset($MemberUpToDate[$key])?$MemberUpToDate[$key]:0;
|
||||
$dataval['resiliated'][]=isset($MembersResiliated[$key])?$MembersResiliated[$key]:0;
|
||||
$SommeA+=isset($MemberToValidate[$key])?$MemberToValidate[$key]:0;
|
||||
$SommeB+=isset($MembersValidated[$key])?$MembersValidated[$key]-$MemberUpToDate[$key]:0;
|
||||
$SommeC+=isset($MemberUpToDate[$key])?$MemberUpToDate[$key]:0;
|
||||
$SommeD+=isset($MembersResiliated[$key])?$MembersResiliated[$key]:0;
|
||||
}
|
||||
/*
|
||||
$dataseries[]=array('label'=>$langs->trans("MembersStatusToValid"),'values'=> $dataval['draft']);
|
||||
$dataseries[]=array('label'=>$langs->trans("MenuMembersNotUpToDate"),'values'=> $dataval['notuptodate']);
|
||||
$dataseries[]=array('label'=>$langs->trans("MenuMembersUpToDate"),'values'=> $dataval['uptodate']);
|
||||
$dataseries[]=array('label'=>$langs->trans("MembersStatusResiliated"),'values'=> $dataval['resiliated']);
|
||||
$data=array('series'=>$dataseries,'xlabel'=>$datalabels);
|
||||
dol_print_graph('stats2',300,180,$data,1,'bar');
|
||||
$dataseries=array();
|
||||
*/
|
||||
$dataseries[]=array('label'=>$langs->trans("MenuMembersNotUpToDate"),'values'=>array(round($SommeB)));
|
||||
$dataseries[]=array('label'=>$langs->trans("MenuMembersUpToDate"),'values'=>array(round($SommeC)));
|
||||
$dataseries[]=array('label'=>$langs->trans("MembersStatusResiliated"),'values'=>array(round($SommeD)));
|
||||
$dataseries[]=array('label'=>$langs->trans("MembersStatusToValid"),'values'=>array(round($SommeA)));
|
||||
$data=array('series'=>$dataseries);
|
||||
dol_print_graph('stats',300,180,$data,1,'pie');
|
||||
print '</td></tr>';
|
||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td align="right">';
|
||||
print $SommeA+$SommeB+$SommeC+$SommeD;
|
||||
print '</td></tr>';
|
||||
print '</table>';
|
||||
* Statistics
|
||||
*/
|
||||
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
print '<br>';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Statistics").'</td></tr>';
|
||||
print '<tr><td align="center">';
|
||||
|
||||
$SommeA=0;
|
||||
$SommeB=0;
|
||||
$SommeC=0;
|
||||
$SommeD=0;
|
||||
$dataval=array();
|
||||
$datalabels=array();
|
||||
$dataseries=array();
|
||||
foreach ($AdherentType as $key => $adhtype)
|
||||
{
|
||||
$datalabels[]=$adhtype->getNomUrl(0,dol_size(16));
|
||||
$dataval['draft'][]=isset($MemberToValidate[$key])?$MemberToValidate[$key]:0;
|
||||
$dataval['notuptodate'][]=isset($MembersValidated[$key])?$MembersValidated[$key]-$MemberUpToDate[$key]:0;
|
||||
$dataval['uptodate'][]=isset($MemberUpToDate[$key])?$MemberUpToDate[$key]:0;
|
||||
$dataval['resiliated'][]=isset($MembersResiliated[$key])?$MembersResiliated[$key]:0;
|
||||
$SommeA+=isset($MemberToValidate[$key])?$MemberToValidate[$key]:0;
|
||||
$SommeB+=isset($MembersValidated[$key])?$MembersValidated[$key]-$MemberUpToDate[$key]:0;
|
||||
$SommeC+=isset($MemberUpToDate[$key])?$MemberUpToDate[$key]:0;
|
||||
$SommeD+=isset($MembersResiliated[$key])?$MembersResiliated[$key]:0;
|
||||
}
|
||||
/*
|
||||
$dataseries[]=array('label'=>$langs->trans("MembersStatusToValid"),'values'=> $dataval['draft']);
|
||||
$dataseries[]=array('label'=>$langs->trans("MenuMembersNotUpToDate"),'values'=> $dataval['notuptodate']);
|
||||
$dataseries[]=array('label'=>$langs->trans("MenuMembersUpToDate"),'values'=> $dataval['uptodate']);
|
||||
$dataseries[]=array('label'=>$langs->trans("MembersStatusResiliated"),'values'=> $dataval['resiliated']);
|
||||
$data=array('series'=>$dataseries,'xlabel'=>$datalabels);
|
||||
dol_print_graph('stats2',300,180,$data,1,'bar');
|
||||
$dataseries=array();
|
||||
*/
|
||||
$dataseries[]=array('label'=>$langs->trans("MenuMembersNotUpToDate"),'values'=>array(round($SommeB)));
|
||||
$dataseries[]=array('label'=>$langs->trans("MenuMembersUpToDate"),'values'=>array(round($SommeC)));
|
||||
$dataseries[]=array('label'=>$langs->trans("MembersStatusResiliated"),'values'=>array(round($SommeD)));
|
||||
$dataseries[]=array('label'=>$langs->trans("MembersStatusToValid"),'values'=>array(round($SommeA)));
|
||||
$data=array('series'=>$dataseries);
|
||||
dol_print_graph('stats',300,180,$data,1,'pie');
|
||||
print '</td></tr>';
|
||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td align="right">';
|
||||
print $SommeA+$SommeB+$SommeC+$SommeD;
|
||||
print '</td></tr>';
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
print '</td><td class="notopnoleftnoright" valign="top">';
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -77,7 +77,82 @@ print "</form></table><br>\n";
|
||||
|
||||
|
||||
/*
|
||||
* Commandes brouillons
|
||||
* Statistics
|
||||
*/
|
||||
|
||||
$sql = "SELECT count(cf.rowid), cf.fk_statut, cf.facture";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."commande as cf";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE cf.fk_soc = s.rowid";
|
||||
$sql.= " AND s.entity = ".$conf->entity;
|
||||
if ($user->societe_id) $sql.=' AND cf.fk_soc = '.$user->societe_id;
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
$sql.= " GROUP BY cf.fk_statut, cf.facture";
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
|
||||
$var=True;
|
||||
|
||||
$total=0;
|
||||
$totalinprocess=0;
|
||||
$dataseries=array();
|
||||
$vals=array();
|
||||
// -1=Canceled, 0=Draft, 1=Validated, (2=Accepted/On process not managed for customer orders), 3=Closed (Sent/Received, billed or not)
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $db->fetch_row($resql);
|
||||
if ($row)
|
||||
{
|
||||
if ($row[1]!=3 || $row[2]!=1)
|
||||
{
|
||||
$vals[$row[1]]=$row[0];
|
||||
$totalinprocess+=$row[0];
|
||||
}
|
||||
$total+=$row[0];
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
$db->free($resql);
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Statistics").'</td></tr>';
|
||||
print "</tr>\n";
|
||||
foreach (array(1,2,3,-1) as $statut)
|
||||
{
|
||||
$dataseries[]=array('label'=>$commandestatic->LibStatut($statut,0),'values'=>array(0=>(isset($vals[$statut])?$vals[$statut]:0)));
|
||||
if (! $conf->use_javascript_ajax)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td>'.$commandestatic->LibStatut($statut,0).'</td>';
|
||||
print '<td align="right"><a href="liste.php?statut='.$statut.'">'.(isset($vals[$statut])?$vals[$statut]:0).'</a></td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
print '<tr><td align="center" colspan="2">';
|
||||
$data=array('series'=>$dataseries);
|
||||
dol_print_graph('stats',300,180,$data,1,'pie');
|
||||
print '</td></tr>';
|
||||
}
|
||||
//if ($totalinprocess != $total)
|
||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").' ('.$langs->trans("CustomersOrdersRunning").')</td><td align="right">'.$totalinprocess.'</td></tr>';
|
||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").' ('.$langs->trans("CustomersOrders").')</td><td align="right">'.$total.'</td></tr>';
|
||||
print "</table><br>";
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Draft orders
|
||||
*/
|
||||
if ($conf->commande->enabled)
|
||||
{
|
||||
|
||||
@ -40,8 +40,8 @@ $langs->load("orders");
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader('',$langs->trans("SuppliersOrdersArea"));
|
||||
|
||||
@ -71,7 +71,7 @@ print "</form></table><br>\n";
|
||||
|
||||
|
||||
/*
|
||||
* Legends / Status
|
||||
* Statistics
|
||||
*/
|
||||
|
||||
$sql = "SELECT count(cf.rowid), fk_statut";
|
||||
@ -87,34 +87,65 @@ $sql.= " GROUP BY cf.fk_statut";
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
|
||||
print '<table class="liste" width="100%">';
|
||||
$var=True;
|
||||
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Status").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Nb").'</td>';
|
||||
print "</tr>\n";
|
||||
$var=True;
|
||||
|
||||
while ($i < $num)
|
||||
$total=0;
|
||||
$totalinprocess=0;
|
||||
$dataseries=array();
|
||||
$vals=array();
|
||||
// 0=Draft -> 1=Validated -> 2=Approved -> 3=Process runing -> 4=Received partially -> 5=Received totally -> (reopen) 4=Received partially
|
||||
// -> 7=Canceled/Never received -> (reopen) 3=Process runing
|
||||
// -> 6=Canceled -> (reopen) 2=Approved
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $db->fetch_row($resql);
|
||||
$var=!$var;
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td>'.$langs->trans($commandestatic->statuts[$row[1]]).'</td>';
|
||||
print '<td align="right"><a href="liste.php?statut='.$row[1].'">'.$row[0].' '.$commandestatic->LibStatut($row[1],3).'</a></td>';
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
$row = $db->fetch_row($resql);
|
||||
if ($row)
|
||||
{
|
||||
if ($row[1]!=7 && $row[1]!=6 && $row[1]!=5)
|
||||
{
|
||||
$vals[$row[1]]=$row[0];
|
||||
$totalinprocess+=$row[0];
|
||||
}
|
||||
$total+=$row[0];
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
print "</table><br>";
|
||||
$db->free($resql);
|
||||
$db->free($resql);
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Statistics").'</td></tr>';
|
||||
print "</tr>\n";
|
||||
foreach (array(0,1,2,3,4) as $statut)
|
||||
{
|
||||
$dataseries[]=array('label'=>$commandestatic->LibStatut($statut,0),'values'=>array(0=>(isset($vals[$statut])?$vals[$statut]:0)));
|
||||
if (! $conf->use_javascript_ajax)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td>'.$commandestatic->LibStatut($statut,0).'</td>';
|
||||
print '<td align="right"><a href="liste.php?statut='.$statut.'">'.(isset($vals[$statut])?$vals[$statut]:0).'</a></td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
print '<tr><td align="center" colspan="2">';
|
||||
$data=array('series'=>$dataseries);
|
||||
dol_print_graph('stats',300,180,$data,1,'pie');
|
||||
print '</td></tr>';
|
||||
}
|
||||
//if ($totalinprocess != $total)
|
||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").' ('.$langs->trans("SuppliersOrdersRunning").')</td><td align="right">'.$totalinprocess.'</td></tr>';
|
||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").' ('.$langs->trans("SuppliersOrders").')</td><td align="right">'.$total.'</td></tr>';
|
||||
|
||||
print "</table><br>";
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -122,41 +153,41 @@ else
|
||||
*/
|
||||
if ($conf->fournisseur->enabled)
|
||||
{
|
||||
$sql = "SELECT c.rowid, c.ref, s.nom, s.rowid as socid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as c";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE c.fk_soc = s.rowid";
|
||||
$sql.= " AND c.entity = ".$conf->entity;
|
||||
$sql.= " AND c.fk_statut = 0";
|
||||
if ($socid) $sql.= " AND c.fk_soc = ".$socid;
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
$sql = "SELECT c.rowid, c.ref, s.nom, s.rowid as socid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as c";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE c.fk_soc = s.rowid";
|
||||
$sql.= " AND c.entity = ".$conf->entity;
|
||||
$sql.= " AND c.fk_statut = 0";
|
||||
if ($socid) $sql.= " AND c.fk_soc = ".$socid;
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">'.$langs->trans("DraftOrders").'</td></tr>';
|
||||
$langs->load("orders");
|
||||
$num = $db->num_rows($resql);
|
||||
if ($num)
|
||||
{
|
||||
$i = 0;
|
||||
$var = True;
|
||||
while ($i < $num)
|
||||
{
|
||||
$var=!$var;
|
||||
$obj = $db->fetch_object($resql);
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td nowrap="nowrap">';
|
||||
print "<a href=\"fiche.php?id=".$obj->rowid."\">".img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref."</a></td>";
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/fourn/fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,24).'</a></td></tr>';
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
print "</table><br>";
|
||||
}
|
||||
if ($resql)
|
||||
{
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">'.$langs->trans("DraftOrders").'</td></tr>';
|
||||
$langs->load("orders");
|
||||
$num = $db->num_rows($resql);
|
||||
if ($num)
|
||||
{
|
||||
$i = 0;
|
||||
$var = True;
|
||||
while ($i < $num)
|
||||
{
|
||||
$var=!$var;
|
||||
$obj = $db->fetch_object($resql);
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td nowrap="nowrap">';
|
||||
print "<a href=\"fiche.php?id=".$obj->rowid."\">".img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref."</a></td>";
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/fourn/fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,24).'</a></td></tr>';
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
print "</table><br>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -178,35 +209,35 @@ $sql.= " AND subperms = 'approuver'";
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
|
||||
print '<table class="liste" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("UserWithApproveOrderGrant").'</td>';
|
||||
print "</tr>\n";
|
||||
$var=True;
|
||||
print '<table class="liste" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("UserWithApproveOrderGrant").'</td>';
|
||||
print "</tr>\n";
|
||||
$var=True;
|
||||
|
||||
while ($i < $num)
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
$var=!$var;
|
||||
$obj = $db->fetch_object($resql);
|
||||
$var=!$var;
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td>';
|
||||
$userstatic->id=$obj->rowid;
|
||||
$userstatic->nom=$obj->name;
|
||||
$userstatic->prenom=$obj->firstname;
|
||||
print $userstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td>';
|
||||
$userstatic->id=$obj->rowid;
|
||||
$userstatic->nom=$obj->name;
|
||||
$userstatic->prenom=$obj->firstname;
|
||||
print $userstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
print "</table><br>";
|
||||
$db->free($resql);
|
||||
print "</table><br>";
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
@ -234,52 +265,52 @@ $sql.= $db->plimit($max, 0);
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="4">'.$langs->trans("LastModifiedOrders",$max).'</td></tr>';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="4">'.$langs->trans("LastModifiedOrders",$max).'</td></tr>';
|
||||
|
||||
$num = $db->num_rows($resql);
|
||||
if ($num)
|
||||
{
|
||||
$i = 0;
|
||||
$var = True;
|
||||
while ($i < $num)
|
||||
{
|
||||
$var=!$var;
|
||||
$obj = $db->fetch_object($resql);
|
||||
$num = $db->num_rows($resql);
|
||||
if ($num)
|
||||
{
|
||||
$i = 0;
|
||||
$var = True;
|
||||
while ($i < $num)
|
||||
{
|
||||
$var=!$var;
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td width="20%" nowrap="nowrap">';
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td width="20%" nowrap="nowrap">';
|
||||
|
||||
$commandestatic->id=$obj->rowid;
|
||||
$commandestatic->ref=$obj->ref;
|
||||
$commandestatic->id=$obj->rowid;
|
||||
$commandestatic->ref=$obj->ref;
|
||||
|
||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||
print '<td width="94" class="nobordernopadding" nowrap="nowrap">';
|
||||
print $commandestatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||
print '<td width="94" class="nobordernopadding" nowrap="nowrap">';
|
||||
print $commandestatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
|
||||
print '<td width="16" class="nobordernopadding" nowrap="nowrap">';
|
||||
print ' ';
|
||||
print '</td>';
|
||||
print '<td width="16" class="nobordernopadding" nowrap="nowrap">';
|
||||
print ' ';
|
||||
print '</td>';
|
||||
|
||||
print '<td width="16" align="right" class="nobordernopadding">';
|
||||
$filename=dol_sanitizeFileName($obj->ref);
|
||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||
$formfile->show_documents('commande',$filename,$filedir,$urlsource,'','','',1,'',1);
|
||||
print '</td></tr></table>';
|
||||
print '<td width="16" align="right" class="nobordernopadding">';
|
||||
$filename=dol_sanitizeFileName($obj->ref);
|
||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||
$formfile->show_documents('commande',$filename,$filedir,$urlsource,'','','',1,'',1);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</td>';
|
||||
print '</td>';
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/fourn/fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.'</a></td>';
|
||||
print '<td>'.dol_print_date($db->jdate($obj->datec)).'</td>';
|
||||
print '<td align="right">'.$commandestatic->LibStatut($obj->fk_statut,5).'</td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
print "</table><br>";
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/fourn/fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom.'</a></td>';
|
||||
print '<td>'.dol_print_date($db->jdate($obj->datec)).'</td>';
|
||||
print '<td align="right">'.$commandestatic->LibStatut($obj->fk_statut,5).'</td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
print "</table><br>";
|
||||
}
|
||||
else dol_print_error($db);
|
||||
|
||||
@ -288,70 +319,70 @@ else dol_print_error($db);
|
||||
* Orders to process
|
||||
*/
|
||||
/*
|
||||
$sql = "SELECT c.rowid, c.ref, c.fk_statut, s.nom, s.rowid as socid";
|
||||
$sql.=" FROM ".MAIN_DB_PREFIX."commande_fournisseur as c";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE c.fk_soc = s.rowid";
|
||||
$sql.= " AND c.entity = ".$conf->entity;
|
||||
$sql.= " AND c.fk_statut = 1";
|
||||
if ($socid) $sql.= " AND c.fk_soc = ".$socid;
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
$sql.= " ORDER BY c.rowid DESC";
|
||||
$sql = "SELECT c.rowid, c.ref, c.fk_statut, s.nom, s.rowid as socid";
|
||||
$sql.=" FROM ".MAIN_DB_PREFIX."commande_fournisseur as c";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE c.fk_soc = s.rowid";
|
||||
$sql.= " AND c.entity = ".$conf->entity;
|
||||
$sql.= " AND c.fk_statut = 1";
|
||||
if ($socid) $sql.= " AND c.fk_soc = ".$socid;
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
$sql.= " ORDER BY c.rowid DESC";
|
||||
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="3">'.$langs->trans("OrdersToProcess").' <a href="'.DOL_URL_ROOT.'/commande/liste.php?viewstatut=1">('.$num.')</a></td></tr>';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="3">'.$langs->trans("OrdersToProcess").' <a href="'.DOL_URL_ROOT.'/commande/liste.php?viewstatut=1">('.$num.')</a></td></tr>';
|
||||
|
||||
if ($num)
|
||||
{
|
||||
$i = 0;
|
||||
$var = True;
|
||||
while ($i < $num)
|
||||
{
|
||||
$var=!$var;
|
||||
$obj = $db->fetch_object($resql);
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td nowrap="nowrap">';
|
||||
if ($num)
|
||||
{
|
||||
$i = 0;
|
||||
$var = True;
|
||||
while ($i < $num)
|
||||
{
|
||||
$var=!$var;
|
||||
$obj = $db->fetch_object($resql);
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td nowrap="nowrap">';
|
||||
|
||||
$commandestatic->id=$obj->rowid;
|
||||
$commandestatic->ref=$obj->ref;
|
||||
$commandestatic->id=$obj->rowid;
|
||||
$commandestatic->ref=$obj->ref;
|
||||
|
||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||
print '<td width="94" class="nobordernopadding" nowrap="nowrap">';
|
||||
print $commandestatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||
print '<td width="94" class="nobordernopadding" nowrap="nowrap">';
|
||||
print $commandestatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
|
||||
print '<td width="16" class="nobordernopadding" nowrap="nowrap">';
|
||||
print ' ';
|
||||
print '</td>';
|
||||
print '<td width="16" class="nobordernopadding" nowrap="nowrap">';
|
||||
print ' ';
|
||||
print '</td>';
|
||||
|
||||
print '<td width="16" align="right" class="nobordernopadding">';
|
||||
$filename=dol_sanitizeFileName($obj->ref);
|
||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||
$formfile->show_documents('commande',$filename,$filedir,$urlsource,'','','',1,'',1);
|
||||
print '</td></tr></table>';
|
||||
print '<td width="16" align="right" class="nobordernopadding">';
|
||||
$filename=dol_sanitizeFileName($obj->ref);
|
||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||
$formfile->show_documents('commande',$filename,$filedir,$urlsource,'','','',1,'',1);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</td>';
|
||||
print '</td>';
|
||||
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,24).'</a></td>';
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,24).'</a></td>';
|
||||
|
||||
print '<td align="right">'.$commandestatic->LibStatut($obj->fk_statut,$obj->facture,5).'</td>';
|
||||
print '<td align="right">'.$commandestatic->LibStatut($obj->fk_statut,$obj->facture,5).'</td>';
|
||||
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
print "</table><br>";
|
||||
}
|
||||
*/
|
||||
print "</table><br>";
|
||||
}
|
||||
*/
|
||||
|
||||
print '</td></tr></table>';
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
|
||||
global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet;
|
||||
$theme_bordercolor = array(235,235,224);
|
||||
$theme_datacolor = array(array(120,130,150), array(200,160,180), array(190,190,220), array(140,170,150));
|
||||
$theme_datacolor = array(array(125,135,150), array(200,160,180), array(190,190,220), array(170,140,190), array(190,190,170));
|
||||
$theme_bgcolor = array(hexdec('F4'),hexdec('F4'),hexdec('F4'));
|
||||
$theme_bgcoloronglet = array(hexdec('DE'),hexdec('E7'),hexdec('EC'));
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
|
||||
global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet;
|
||||
$theme_bordercolor = array(235,235,224);
|
||||
$theme_datacolor = array(array(120,130,150), array(200,160,180), array(190,190,220), array(140,170,150));
|
||||
$theme_datacolor = array(array(125,135,150), array(200,160,180), array(190,190,220), array(170,140,190), array(190,190,170));
|
||||
$theme_bgcolor = array(hexdec('F4'),hexdec('F4'),hexdec('F4'));
|
||||
$theme_bgcoloronglet = array(hexdec('DE'),hexdec('E7'),hexdec('EC'));
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user