New: Personalisation des propal par un picto.
This commit is contained in:
parent
7f9d700447
commit
e5efb28a6c
@ -295,7 +295,7 @@ if ($_socid > 0)
|
|||||||
{
|
{
|
||||||
$objp = $db->fetch_object();
|
$objp = $db->fetch_object();
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
print "<td><a href=\"propal.php?propalid=$objp->propalid\">$objp->ref</a>\n";
|
print "<td><a href=\"propal.php?propalid=$objp->propalid\">".img_object($langs->trans("ShowPropal"),"propal")." ".$objp->ref."</a>\n";
|
||||||
if ( ($now - $objp->dp) > $lim && $objp->statutid == 1 )
|
if ( ($now - $objp->dp) > $lim && $objp->statutid == 1 )
|
||||||
{
|
{
|
||||||
print " <b>> 15 jours</b>";
|
print " <b>> 15 jours</b>";
|
||||||
@ -343,7 +343,7 @@ if ($_socid > 0)
|
|||||||
$objp = $db->fetch_object();
|
$objp = $db->fetch_object();
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/commande/fiche.php?id='.$objp->propalid.'">'.$objp->ref."</a>\n";
|
print '<td><a href="'.DOL_URL_ROOT.'/commande/fiche.php?id='.$objp->propalid.'">'.img_object($langs->trans("ShowOrder"),"order").' '.$objp->ref."</a>\n";
|
||||||
if ( ($now - $objp->dp) > $lim && $objp->statutid == 1 )
|
if ( ($now - $objp->dp) > $lim && $objp->statutid == 1 )
|
||||||
{
|
{
|
||||||
print " <b>> 15 jours</b>";
|
print " <b>> 15 jours</b>";
|
||||||
|
|||||||
@ -79,7 +79,7 @@ if ($_GET["action"] == 'del_bookmark')
|
|||||||
* Affichage page
|
* Affichage page
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print_titre("Espace commercial");
|
print_titre($langs->trans("CommercialArea"));
|
||||||
|
|
||||||
print '<table border="0" width="100%">';
|
print '<table border="0" width="100%">';
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ if ($conf->propal->enabled) {
|
|||||||
{
|
{
|
||||||
$obj = $db->fetch_object();
|
$obj = $db->fetch_object();
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr $bc[$var]><td><a href=\"".DOL_URL_ROOT."/comm/propal.php?propalid=".$obj->rowid."\">".$obj->ref."</a></td><td>".$obj->nom."</td><td align=\"right\">".price($obj->price)."</td></tr>";
|
print "<tr $bc[$var]><td><a href=\"".DOL_URL_ROOT."/comm/propal.php?propalid=".$obj->rowid."\">".img_object($langs->trans("ShowPropal"),"propal")." ".$obj->ref."</a></td><td>".$obj->nom."</td><td align=\"right\">".price($obj->price)."</td></tr>";
|
||||||
$i++;
|
$i++;
|
||||||
$total += $obj->price;
|
$total += $obj->price;
|
||||||
}
|
}
|
||||||
@ -174,7 +174,7 @@ if ($conf->commande->enabled)
|
|||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object();
|
$obj = $db->fetch_object();
|
||||||
print "<tr $bc[$var]><td width=\"20%\"><a href=\"../commande/fiche.php?id=$obj->rowid\">$obj->ref</a></td>";
|
print "<tr $bc[$var]><td width=\"20%\"><a href=\"../commande/fiche.php?id=$obj->rowid\">".img_object($langs->trans("ShowOrder"),"order")." ".$obj->ref."</a></td>";
|
||||||
print '<td><a href="fiche.php?socid='.$obj->idp.'">'.$obj->nom.'</a></td></tr>';
|
print '<td><a href="fiche.php?socid='.$obj->idp.'">'.$obj->nom.'</a></td></tr>';
|
||||||
$i++;
|
$i++;
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
@ -364,8 +364,7 @@ if ($conf->contrat->enabled && 0) // TODO A REFAIRE DEPUIS NOUVEAU CONTRAT
|
|||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object();
|
$obj = $db->fetch_object();
|
||||||
print "<tr $bc[$var]><td><a href=\"../contrat/fiche.php?id=".$obj->rowid."\">".img_file()."</a> ";
|
print "<tr $bc[$var]><td><a href=\"../contrat/fiche.php?id=".$obj->rowid."\">".img_object($langs->trans("ShowContract","contract"))." ".$obj->ref."</a></td>";
|
||||||
print "<a href=\"../contrat/fiche.php?id=".$obj->rowid."\">".$obj->ref."</a></td>";
|
|
||||||
print "<td><a href=\"fiche.php?socid=$obj->idp\">$obj->nom</a></td>\n";
|
print "<td><a href=\"fiche.php?socid=$obj->idp\">$obj->nom</a></td>\n";
|
||||||
print "<td align=\"right\">".$contrat->LibStatut($obj->enservice)."</td></tr>\n";
|
print "<td align=\"right\">".$contrat->LibStatut($obj->enservice)."</td></tr>\n";
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
@ -408,9 +407,8 @@ if ($conf->propal->enabled) {
|
|||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object();
|
$obj = $db->fetch_object();
|
||||||
print "<tr $bc[$var]><td width=\"15%\"><a href=\"propal.php?propalid=".$obj->propalid."\">".img_file()."</a> ";
|
print "<tr $bc[$var]><td width=\"15%\"><a href=\"propal.php?propalid=".$obj->propalid."\">".img_object($langs->trans("ShowPropal"),"propal")." ".$obj->ref."</a></td>";
|
||||||
print "<a href=\"propal.php?propalid=".$obj->propalid."\">".$obj->ref."</a></td>";
|
print "<td width=\"30%\"><a href=\"fiche.php?socid=$obj->idp\">".img_object($langs->trans("ShowCompany"),"company")." ".$obj->nom."</a></td>\n";
|
||||||
print "<td width=\"30%\"><a href=\"fiche.php?socid=$obj->idp\">$obj->nom</a></td>\n";
|
|
||||||
print "<td align=\"right\">";
|
print "<td align=\"right\">";
|
||||||
print strftime("%e %b %Y",$obj->dp)."</td>\n";
|
print strftime("%e %b %Y",$obj->dp)."</td>\n";
|
||||||
print "<td align=\"right\">".price($obj->price)."</td></tr>\n";
|
print "<td align=\"right\">".price($obj->price)."</td></tr>\n";
|
||||||
|
|||||||
@ -354,7 +354,7 @@ if ($_GET["propalid"])
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<tr><td>Remise</td>';
|
print '<tr><td>'.$langs->trans("Discount").'</td>';
|
||||||
print '<td align="right">'.$propal->remise_percent.' %</td><td> </td>';
|
print '<td align="right">'.$propal->remise_percent.' %</td><td> </td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -393,7 +393,7 @@ if ($_GET["propalid"])
|
|||||||
print '</select>';
|
print '</select>';
|
||||||
print '</td></tr><tr><td>'.$langs->trans("Comments").' : <br><textarea cols="60" rows="6" wrap="soft" name="note">';
|
print '</td></tr><tr><td>'.$langs->trans("Comments").' : <br><textarea cols="60" rows="6" wrap="soft" name="note">';
|
||||||
print $obj->note;
|
print $obj->note;
|
||||||
print '</textarea></td></tr><tr><td align="center"><input type="submit" value="Valider"></td>';
|
print '</textarea></td></tr><tr><td align="center"><input type="submit" value="'.$langs->trans("Valid").'"></td>';
|
||||||
print "</tr></table></form>";
|
print "</tr></table></form>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -405,11 +405,11 @@ if ($_GET["propalid"])
|
|||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print "<tr class=\"liste_titre\">";
|
print "<tr class=\"liste_titre\">";
|
||||||
print '<td>'.$langs->trans("Ref").'</td><td>'.$langs->trans("ProductOrService").'</td>';
|
print '<td>'.$langs->trans("Ref").'</td><td>'.$langs->trans("ProductOrService").'</td>';
|
||||||
print '<td align="center">'.$langs->trans("VAT").'</td><td align="center">'.$langs->trans("Qty").'</td><td align="center">Remise</td><td align="right">P.U.</td>';
|
print '<td align="center">'.$langs->trans("VAT").'</td><td align="center">'.$langs->trans("Qty").'</td><td align="center">'.$langs->trans("Discount").'</td><td align="right">P.U.</td>';
|
||||||
print "<td> </td>";
|
print "<td> </td>";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$sql = "SELECT pt.rowid, p.label as product, p.ref, pt.price, pt.qty, p.rowid as prodid, pt.tva_tx, pt.remise_percent, pt.subprice";
|
$sql = "SELECT pt.rowid, p.label as product, p.ref, pt.price, p.fk_product_type, pt.qty, p.rowid as prodid, pt.tva_tx, pt.remise_percent, pt.subprice";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."propaldet as pt, ".MAIN_DB_PREFIX."product as p WHERE pt.fk_product = p.rowid AND pt.fk_propal = $propal->id";
|
$sql .= " FROM ".MAIN_DB_PREFIX."propaldet as pt, ".MAIN_DB_PREFIX."product as p WHERE pt.fk_product = p.rowid AND pt.fk_propal = $propal->id";
|
||||||
$sql .= " ORDER BY pt.rowid ASC";
|
$sql .= " ORDER BY pt.rowid ASC";
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
@ -425,8 +425,11 @@ if ($_GET["propalid"])
|
|||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
print "<td>[$objp->ref]</td>\n";
|
print "<td>".$objp->ref."</td>\n";
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->prodid.'">'.$objp->product.'</a></td>';
|
print '<td><a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->prodid.'">';
|
||||||
|
if ($objp->fk_product_type==0) print img_object($langs->trans("ShowProduct"),"product");
|
||||||
|
if ($objp->fk_product_type==1) print img_object($langs->trans("ShowService"),"service");
|
||||||
|
print ' '.$objp->product.'</a></td>';
|
||||||
print '<td align="center">'.$objp->tva_tx.' %</td>';
|
print '<td align="center">'.$objp->tva_tx.' %</td>';
|
||||||
print "<td align=\"center\">".$objp->qty."</td>\n";
|
print "<td align=\"center\">".$objp->qty."</td>\n";
|
||||||
print '<td align="center">'.$objp->remise_percent.' %</td>';
|
print '<td align="center">'.$objp->remise_percent.' %</td>';
|
||||||
@ -704,32 +707,20 @@ if ($_GET["propalid"])
|
|||||||
$coms = $propal->commande_liste_array();
|
$coms = $propal->commande_liste_array();
|
||||||
print '<br><table class="border" width="100%">';
|
print '<br><table class="border" width="100%">';
|
||||||
|
|
||||||
if ($nb_commande == 1)
|
print "<tr><td>Commande(s) rattachée(s)</td></tr>\n";
|
||||||
|
|
||||||
{
|
|
||||||
print "<tr><td>Commande rattachée : ";
|
|
||||||
print '<a href="'.DOL_URL_ROOT.'/commande/fiche.php?id='.$coms[0].'">';
|
|
||||||
print img_file();
|
|
||||||
print '</a> <a href="'.DOL_URL_ROOT.'/commande/fiche.php?id='.$coms[0].'">'.$coms[0]."</a>";
|
|
||||||
print "</td></tr>\n";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print "<tr><td>Commandes rattachées</td></tr>\n";
|
|
||||||
|
|
||||||
for ($i = 0 ; $i < $nb_commande ; $i++)
|
for ($i = 0 ; $i < $nb_commande ; $i++)
|
||||||
{
|
{
|
||||||
print '<tr><td><a href="'.DOL_URL_ROOT.'/commande/fiche.php?id='.$coms[$i].'">'.$coms[$i]."</a></td>\n";
|
print '<tr><td><a href="'.DOL_URL_ROOT.'/commande/fiche.php?id='.$coms[$i].'">'.$coms[$i]."</a></td>\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// print '<a href="propal.php?propalid=$propalid&action=commande\">Générer</a>";
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -895,7 +886,7 @@ else
|
|||||||
if ( $db->query($sql) )
|
if ( $db->query($sql) )
|
||||||
{
|
{
|
||||||
$num = $db->num_rows();
|
$num = $db->num_rows();
|
||||||
print_barre_liste("Propositions commerciales", $page,"propal.php","&socidp=$socidp",$sortfield,$sortorder,'',$num);
|
print_barre_liste($langs->trans("Proposals"), $page,"propal.php","&socidp=$socidp",$sortfield,$sortorder,'',$num);
|
||||||
|
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
@ -916,9 +907,7 @@ else
|
|||||||
$now = time();
|
$now = time();
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
print '<td><a href="propal.php?propalid='.$objp->propalid.'">';
|
print '<td><a href="propal.php?propalid='.$objp->propalid.'">'.img_object($langs->trans("ShowPropal"),"propal").' '.$objp->ref."</a></td>\n";
|
||||||
print img_file();
|
|
||||||
print "</a> <a href=\"propal.php?propalid=$objp->propalid\">$objp->ref</a></td>\n";
|
|
||||||
if ($objp->client == 1)
|
if ($objp->client == 1)
|
||||||
{
|
{
|
||||||
$url = DOL_URL_ROOT.'/comm/fiche.php?socid='.$objp->idp;
|
$url = DOL_URL_ROOT.'/comm/fiche.php?socid='.$objp->idp;
|
||||||
@ -928,7 +917,7 @@ else
|
|||||||
$url = DOL_URL_ROOT.'/comm/prospect/fiche.php?socid='.$objp->idp;
|
$url = DOL_URL_ROOT.'/comm/prospect/fiche.php?socid='.$objp->idp;
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<td><a href="'.$url.'">'.$objp->nom.'</a></td>';
|
print '<td><a href="'.$url.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$objp->nom.'</a></td>';
|
||||||
|
|
||||||
if ( $now > $objp->dfv && $objp->dfv > 0 )
|
if ( $now > $objp->dfv && $objp->dfv > 0 )
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2004 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
|
||||||
@ -21,7 +21,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \file htdocs/commande/fiche.php
|
/** \file htdocs/commande/fiche.php
|
||||||
\ingroup commande
|
\ingroup commande
|
||||||
\brief Fiche commande
|
\brief Fiche commande
|
||||||
\version $Revision$
|
\version $Revision$
|
||||||
@ -233,7 +233,7 @@ if ($_GET["action"] == 'create')
|
|||||||
print '<input type="hidden" name="soc_id" value="'.$soc->id.'">' ."\n";
|
print '<input type="hidden" name="soc_id" value="'.$soc->id.'">' ."\n";
|
||||||
print '<input type="hidden" name="remise_percent" value="0">';
|
print '<input type="hidden" name="remise_percent" value="0">';
|
||||||
|
|
||||||
print '<table class="border" cellspacing="0" cellpadding="3" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Customer").' :</td><td>'.$obj->nom.'</td>';
|
print '<tr><td>'.$langs->trans("Customer").' :</td><td>'.$obj->nom.'</td>';
|
||||||
print '<td class="border">'.$langs->trans("Comments").' :</td></tr>';
|
print '<td class="border">'.$langs->trans("Comments").' :</td></tr>';
|
||||||
@ -270,9 +270,9 @@ if ($_GET["action"] == 'create')
|
|||||||
print '<input type="hidden" name="tva" value="'.$obj->tva.'">'."\n";
|
print '<input type="hidden" name="tva" value="'.$obj->tva.'">'."\n";
|
||||||
print '<input type="hidden" name="propalid" value="'.$propalid.'">';
|
print '<input type="hidden" name="propalid" value="'.$propalid.'">';
|
||||||
|
|
||||||
print '<tr><td>Proposition</td><td colspan="2">'.$obj->ref.'</td></tr>';
|
print '<tr><td>'.$langs->trans("Ref").'</td><td colspan="2">'.$obj->ref.'</td></tr>';
|
||||||
print '<tr><td>Montant HT</td><td colspan="2">'.price($amount).'</td></tr>';
|
print '<tr><td>'.$langs->trans("TotalTTC").'</td><td colspan="2">'.price($amount).'</td></tr>';
|
||||||
print '<tr><td>TVA</td><td colspan="2">'.price($obj->tva)."</td></tr>";
|
print '<tr><td>'.$langs->trans("VAT").'</td><td colspan="2">'.price($obj->tva)."</td></tr>";
|
||||||
print '<tr><td>'.$langs->trans("TotalTTC").'</td><td colspan="2">'.price($obj->total)."</td></tr>";
|
print '<tr><td>'.$langs->trans("TotalTTC").'</td><td colspan="2">'.price($obj->total)."</td></tr>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -304,7 +304,7 @@ if ($_GET["action"] == 'create')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $db->error();
|
dolibarr_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<table class="noborder" cellspacing="0">';
|
print '<table class="noborder" cellspacing="0">';
|
||||||
@ -323,7 +323,7 @@ if ($_GET["action"] == 'create')
|
|||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
print '<tr><td colspan="3" align="center"><input type="submit" value="Créer"></td></tr>';
|
print '<tr><td colspan="3" align="center"><input type="submit" value="'.$langs->trans("Create").'"></td></tr>';
|
||||||
print "</form>\n";
|
print "</form>\n";
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
@ -332,11 +332,11 @@ if ($_GET["action"] == 'create')
|
|||||||
/*
|
/*
|
||||||
* Produits
|
* Produits
|
||||||
*/
|
*/
|
||||||
print_titre("Produits");
|
print_titre($langs->trans("Products"));
|
||||||
|
|
||||||
print '<table class="noborder" width="100%" cellspacing="0" cellpadding="3">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td>'.$langs->trans("Ref").'</td><td>Produit</td>';
|
print '<tr class="liste_titre"><td>'.$langs->trans("Ref").'</td><td>'.$langs->trans("Product").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Price").'</td><td align="center">Remise</td><td align="center">Qté.</td></tr>';
|
print '<td align="right">'.$langs->trans("Price").'</td><td align="center">Remise</td><td align="center">'.$langs->trans("Qty").'</td></tr>';
|
||||||
|
|
||||||
$sql = "SELECT pt.rowid, p.label as product, p.ref, pt.price, pt.qty, p.rowid as prodid, pt.remise_percent";
|
$sql = "SELECT pt.rowid, p.label as product, p.ref, pt.price, pt.qty, p.rowid as prodid, pt.remise_percent";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."propaldet as pt, ".MAIN_DB_PREFIX."product as p WHERE pt.fk_product = p.rowid AND pt.fk_propal = $propalid";
|
$sql .= " FROM ".MAIN_DB_PREFIX."propaldet as pt, ".MAIN_DB_PREFIX."product as p WHERE pt.fk_product = p.rowid AND pt.fk_propal = $propalid";
|
||||||
@ -352,13 +352,14 @@ if ($_GET["action"] == 'create')
|
|||||||
$objp = $db->fetch_object();
|
$objp = $db->fetch_object();
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr $bc[$var]><td>[$objp->ref]</td>\n";
|
print "<tr $bc[$var]><td>[$objp->ref]</td>\n";
|
||||||
print '<td>'.$objp->product.'</td>';
|
print '<td>'.img_object($langs->trans("ShowProduct"),"product").' '.$objp->product.'</td>';
|
||||||
print "<td align=\"right\">".price($objp->price)."</TD>";
|
print "<td align=\"right\">".price($objp->price)."</td>";
|
||||||
print '<td align="center">'.$objp->remise_percent.' %</td>';
|
print '<td align="center">'.$objp->remise_percent.' %</td>';
|
||||||
print "<td align=\"center\">".$objp->qty."</td></tr>\n";
|
print "<td align=\"center\">".$objp->qty."</td></tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "SELECT pt.rowid, pt.description as product, pt.price, pt.qty, pt.remise_percent";
|
$sql = "SELECT pt.rowid, pt.description as product, pt.price, pt.qty, pt.remise_percent";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."propaldet as pt WHERE pt.fk_propal = $propalid AND pt.fk_product = 0";
|
$sql .= " FROM ".MAIN_DB_PREFIX."propaldet as pt WHERE pt.fk_propal = $propalid AND pt.fk_product = 0";
|
||||||
$sql .= " ORDER BY pt.rowid ASC";
|
$sql .= " ORDER BY pt.rowid ASC";
|
||||||
@ -371,7 +372,7 @@ if ($_GET["action"] == 'create')
|
|||||||
$objp = $db->fetch_object();
|
$objp = $db->fetch_object();
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr $bc[$var]><td> </td>\n";
|
print "<tr $bc[$var]><td> </td>\n";
|
||||||
print '<td>'.$objp->product.'</td>';
|
print '<td>'.img_object($langs->trans("ShowProduct"),"product").' '.$objp->product.'</td>';
|
||||||
print '<td align="right">'.price($objp->price).'</td>';
|
print '<td align="right">'.price($objp->price).'</td>';
|
||||||
print '<td align="center">'.$objp->remise_percent.' %</td>';
|
print '<td align="center">'.$objp->remise_percent.' %</td>';
|
||||||
print "<td align=\"center\">".$objp->qty."</td></tr>\n";
|
print "<td align=\"center\">".$objp->qty."</td></tr>\n";
|
||||||
@ -389,7 +390,7 @@ if ($_GET["action"] == 'create')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $db->error() . "<br>$sql";;
|
dolibarr_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -479,7 +480,9 @@ else
|
|||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Author").'</td><td colspan="2">'.$author->fullname.'</td>';
|
print '<tr><td>'.$langs->trans("Author").'</td><td colspan="2">'.$author->fullname.'</td>';
|
||||||
|
|
||||||
print '<td>Projet : ';
|
print '<td>';
|
||||||
|
if ($conf->projet->enabled) {
|
||||||
|
print $langs->trans("Project").' : ';
|
||||||
if ($commande->projet_id > 0)
|
if ($commande->projet_id > 0)
|
||||||
{
|
{
|
||||||
$projet = New Project($db);
|
$projet = New Project($db);
|
||||||
@ -490,6 +493,7 @@ else
|
|||||||
{
|
{
|
||||||
print '<a href="fiche.php?id='.$id.'&action=classer">Classer la commande</a>';
|
print '<a href="fiche.php?id='.$id.'&action=classer">Classer la commande</a>';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
print " </td></tr>";
|
print " </td></tr>";
|
||||||
|
|
||||||
// Ligne de 3 colonnes
|
// Ligne de 3 colonnes
|
||||||
@ -561,14 +565,14 @@ else
|
|||||||
if ($objp->fk_product > 0)
|
if ($objp->fk_product > 0)
|
||||||
{
|
{
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">'.stripslashes(nl2br($objp->description)).'</a></td>';
|
print '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">'.img_object($langs->trans("ShowProduct"),"product").' '.stripslashes(nl2br($objp->description)).'</a></td>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<td>".stripslashes(nl2br($objp->description))."</TD>\n";
|
print "<td>".stripslashes(nl2br($objp->description))."</td>\n";
|
||||||
}
|
}
|
||||||
print '<td align="center">'.$objp->tva_tx.' %</TD>';
|
print '<td align="center">'.$objp->tva_tx.' %</td>';
|
||||||
print '<td align="center">'.$objp->qty.'</TD>';
|
print '<td align="center">'.$objp->qty.'</td>';
|
||||||
if ($objp->remise_percent > 0)
|
if ($objp->remise_percent > 0)
|
||||||
{
|
{
|
||||||
print '<td align="right">'.$objp->remise_percent." %</td>\n";
|
print '<td align="right">'.$objp->remise_percent." %</td>\n";
|
||||||
@ -628,10 +632,11 @@ else
|
|||||||
$sql .= " ORDER BY p.nbvente DESC LIMIT 20";
|
$sql .= " ORDER BY p.nbvente DESC LIMIT 20";
|
||||||
if ( $db->query($sql) )
|
if ( $db->query($sql) )
|
||||||
{
|
{
|
||||||
$opt = "<option value=\"0\" SELECTED></option>";
|
$opt = "<option value=\"0\" selected></option>";
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows(); $i = 0;
|
$num = $db->num_rows();
|
||||||
|
$i = 0;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object();
|
$objp = $db->fetch_object();
|
||||||
@ -643,16 +648,16 @@ else
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $db->error();
|
dolibarr_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<form action=\"fiche.php?id=$id\" method=\"post\">";
|
print "<form action=\"fiche.php?id=$id\" method=\"post\">";
|
||||||
print "<tr class=\"liste_titre\">";
|
print "<tr class=\"liste_titre\">";
|
||||||
print '<td width="54%">'.$langs->trans("Description").'</td>';
|
print '<td width="54%">'.$langs->trans("Description").'</td>';
|
||||||
print '<td width="8%" align="center">Tva</td>';
|
print '<td width="8%" align="center">'.$langs->trans("VAT").'</td>';
|
||||||
print '<td width="8%" align="center">Quantité</td>';
|
print '<td width="8%" align="center">'.$langs->trans("Qty").'</td>';
|
||||||
print '<td width="8%" align="right">Remise</td>';
|
print '<td width="8%" align="right">'.$langs->trans("Discount").'</td>';
|
||||||
print '<td width="12%" align="right">P.U.</TD>';
|
print '<td width="12%" align="right">P.U.</td>';
|
||||||
print '<td> </td><td> </td>'."</tr>\n";
|
print '<td> </td><td> </td>'."</tr>\n";
|
||||||
print '<input type="hidden" name="action" value="addligne">';
|
print '<input type="hidden" name="action" value="addligne">';
|
||||||
print "<tr $bc[$var]>".'<td><textarea name="desc" cols="60" rows="1"></textarea></td>';
|
print "<tr $bc[$var]>".'<td><textarea name="desc" cols="60" rows="1"></textarea></td>';
|
||||||
@ -687,9 +692,9 @@ else
|
|||||||
{
|
{
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
if ($commande->statut > 0 && $commande->statut < 3 && $user->rights->expedition->creer)
|
if ($conf->expedition->enabled && $commande->statut > 0 && $commande->statut < 3 && $user->rights->expedition->creer)
|
||||||
{
|
{
|
||||||
print '<a class="tabAction" href="'.DOL_URL_ROOT.'/expedition/commande.php?id='.$_GET["id"].'">Expédier</a>';
|
print '<a class="tabAction" href="'.DOL_URL_ROOT.'/expedition/commande.php?id='.$_GET["id"].'">'.$langs->trans("Send").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -720,7 +725,7 @@ else
|
|||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|
||||||
|
|
||||||
print '<table width="100%" cellspacing="2"><tr><td width="50%" valign="top">';
|
print '<table width="100%"><tr><td width="50%" valign="top">';
|
||||||
/*
|
/*
|
||||||
* Liste des expéditions
|
* Liste des expéditions
|
||||||
*/
|
*/
|
||||||
@ -737,7 +742,7 @@ else
|
|||||||
print_titre("Expéditions");
|
print_titre("Expéditions");
|
||||||
$i = 0; $total = 0;
|
$i = 0; $total = 0;
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
print "<tr $bc[$var]><td>Expédition</td><td>Date</td></tr>\n";
|
print "<tr $bc[$var]><td>Expédition</td><td>".$langs->trans("Date")."</td></tr>\n";
|
||||||
|
|
||||||
$var=True;
|
$var=True;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
@ -771,10 +776,10 @@ else
|
|||||||
$num = $db->num_rows();
|
$num = $db->num_rows();
|
||||||
if ($num)
|
if ($num)
|
||||||
{
|
{
|
||||||
print_titre("Factures");
|
print_titre($langs->trans("Bills"));
|
||||||
$i = 0; $total = 0;
|
$i = 0; $total = 0;
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
print "<tr $bc[$var]><td>Facture</td><td>".$langs->trans("Date")."</td></tr>\n";
|
print "<tr $bc[$var]><td>".$langs->trans("Bill")."</td><td>".$langs->trans("Date")."</td></tr>\n";
|
||||||
|
|
||||||
$var=True;
|
$var=True;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
@ -807,7 +812,7 @@ else
|
|||||||
if (file_exists($file))
|
if (file_exists($file))
|
||||||
{
|
{
|
||||||
|
|
||||||
print_titre("Documents");
|
print_titre($langs->trans("Documents"));
|
||||||
print '<table width="100%" class="border">';
|
print '<table width="100%" class="border">';
|
||||||
|
|
||||||
print "<tr $bc[$var]><td>".$langs->trans("Order")." PDF</td>";
|
print "<tr $bc[$var]><td>".$langs->trans("Order")." PDF</td>";
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/**
|
||||||
\file htdocs/commande/index.php
|
\file htdocs/commande/index.php
|
||||||
\ingroup compta
|
\ingroup compta
|
||||||
\brief Page acceuil zone comptabilité
|
\brief Page acceuil zone comptabilité
|
||||||
@ -77,8 +77,7 @@ if ( $db->query($sql) )
|
|||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
$obj = $db->fetch_object();
|
$obj = $db->fetch_object();
|
||||||
print "<tr $bc[$var]><td width=\"30%\"><a href=\"fiche.php?id=$obj->rowid\">".img_file()."</a> ";
|
print "<tr $bc[$var]><td width=\"30%\"><a href=\"fiche.php?id=$obj->rowid\">".img_object($langs->trans("ShowOrder"),"order")." ".$obj->ref."</a></td>";
|
||||||
print "<a href=\"fiche.php?id=$obj->rowid\">$obj->ref</a></td>";
|
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->idp.'">'.$obj->nom.'</a></td></tr>';
|
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->idp.'">'.$obj->nom.'</a></td></tr>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
@ -111,8 +110,7 @@ if ( $db->query($sql) )
|
|||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
$obj = $db->fetch_object();
|
$obj = $db->fetch_object();
|
||||||
print "<tr $bc[$var]><td width=\"30%\"><a href=\"fiche.php?id=$obj->rowid\">".img_file()."</a>";
|
print "<tr $bc[$var]><td width=\"30%\"><a href=\"fiche.php?id=$obj->rowid\">".img_object($langs->trans("ShowOrder"),"order")." ".$obj->ref."</a></td>";
|
||||||
print " <a href=\"fiche.php?id=$obj->rowid\">$obj->ref</a></td>";
|
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->idp.'">'.$obj->nom.'</a></td></tr>';
|
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->idp.'">'.$obj->nom.'</a></td></tr>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
# Dolibarr language file - en_US - commercial
|
# Dolibarr language file - en_US - commercial
|
||||||
Commercial=Commercial
|
Commercial=Commercial
|
||||||
|
CommercialArea=Commercial area
|
||||||
Customer=Customer
|
Customer=Customer
|
||||||
Customers=Customers
|
Customers=Customers
|
||||||
Prospect=Prospect
|
Prospect=Prospect
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
# Dolibarr language file - fr_FR - commercial
|
# Dolibarr language file - fr_FR - commercial
|
||||||
Commercial=Commercial
|
Commercial=Commercial
|
||||||
|
CommercialArea=Espace commercial
|
||||||
Customer=Client
|
Customer=Client
|
||||||
Customers=Clients
|
Customers=Clients
|
||||||
Prospect=Prospect
|
Prospect=Prospect
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user