Merge pull request #8850 from grandoc/new_branch_24_05_2018
clean and update code
This commit is contained in:
commit
973384604e
@ -37,8 +37,8 @@ if (! empty($conf->fournisseur->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn
|
|||||||
|
|
||||||
if (! $user->rights->societe->lire) accessforbidden();
|
if (! $user->rights->societe->lire) accessforbidden();
|
||||||
|
|
||||||
$langs->load("commercial");
|
// Load traductions files requiredby by page
|
||||||
$langs->load("propal");
|
$langs->loadLangs(array("commercial", "propal"));
|
||||||
|
|
||||||
$action=GETPOST('action', 'alpha');
|
$action=GETPOST('action', 'alpha');
|
||||||
$bid=GETPOST('bid', 'int');
|
$bid=GETPOST('bid', 'int');
|
||||||
@ -161,7 +161,6 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<th colspan="3">'.$langs->trans("ProposalsDraft").($num?' <span class="badge">'.$num.'</span>':'').'</th></tr>';
|
print '<th colspan="3">'.$langs->trans("ProposalsDraft").($num?' <span class="badge">'.$num.'</span>':'').'</th></tr>';
|
||||||
|
|
||||||
$var=true;
|
|
||||||
if ($num > 0)
|
if ($num > 0)
|
||||||
{
|
{
|
||||||
$i = 0;
|
$i = 0;
|
||||||
@ -243,7 +242,6 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<th colspan="3">'.$langs->trans("SupplierProposalsDraft").($num?' <span class="badge">'.$num.'</span>':'').'</th></tr>';
|
print '<th colspan="3">'.$langs->trans("SupplierProposalsDraft").($num?' <span class="badge">'.$num.'</span>':'').'</th></tr>';
|
||||||
|
|
||||||
$var=true;
|
|
||||||
if ($num > 0)
|
if ($num > 0)
|
||||||
{
|
{
|
||||||
$i = 0;
|
$i = 0;
|
||||||
@ -274,13 +272,11 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos
|
|||||||
}
|
}
|
||||||
if ($total>0)
|
if ($total>0)
|
||||||
{
|
{
|
||||||
|
|
||||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td colspan="2" align="right">'.price($total)."</td></tr>";
|
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td colspan="2" align="right">'.price($total)."</td></tr>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
print '<tr class="oddeven"><td colspan="3" class="opacitymedium">'.$langs->trans("NoProposal").'</td></tr>';
|
print '<tr class="oddeven"><td colspan="3" class="opacitymedium">'.$langs->trans("NoProposal").'</td></tr>';
|
||||||
}
|
}
|
||||||
print "</table></div><br>";
|
print "</table></div><br>";
|
||||||
@ -323,7 +319,6 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<th colspan="3">'.$langs->trans("DraftOrders").($num?' <span class="badge">'.$num.'</span>':'').'</th></tr>';
|
print '<th colspan="3">'.$langs->trans("DraftOrders").($num?' <span class="badge">'.$num.'</span>':'').'</th></tr>';
|
||||||
|
|
||||||
$var = true;
|
|
||||||
if ($num > 0)
|
if ($num > 0)
|
||||||
{
|
{
|
||||||
$i = 0;
|
$i = 0;
|
||||||
@ -411,7 +406,6 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<th colspan="3">'.$langs->trans("DraftSuppliersOrders").($num?' <span class="badge">'.$num.'</span>':'').'</th></tr>';
|
print '<th colspan="3">'.$langs->trans("DraftSuppliersOrders").($num?' <span class="badge">'.$num.'</span>':'').'</th></tr>';
|
||||||
|
|
||||||
$var = true;
|
|
||||||
if ($num > 0)
|
if ($num > 0)
|
||||||
{
|
{
|
||||||
$i = 0;
|
$i = 0;
|
||||||
@ -528,7 +522,6 @@ if (! empty($conf->societe->enabled) && $user->rights->societe->lire)
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
$i++;
|
$i++;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
|
|||||||
@ -88,8 +88,6 @@ if ($resql)
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
if ($num > 0 )
|
if ($num > 0 )
|
||||||
{
|
{
|
||||||
$var=true;
|
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td colspan="2">'.$langs->trans("ProspectsByStatus").'</td></tr>';
|
print '<td colspan="2">'.$langs->trans("ProspectsByStatus").'</td></tr>';
|
||||||
@ -126,8 +124,6 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire)
|
|||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$var=true;
|
|
||||||
|
|
||||||
$total=0;
|
$total=0;
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
@ -197,8 +193,6 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire)
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
if ($num > 0)
|
if ($num > 0)
|
||||||
{
|
{
|
||||||
$var=true;
|
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td colspan="4">'.$langs->trans("ProposalsOpened").'</td></tr>';
|
print '<tr class="liste_titre"><td colspan="4">'.$langs->trans("ProposalsOpened").'</td></tr>';
|
||||||
|
|
||||||
@ -223,7 +217,8 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire)
|
|||||||
$i++;
|
$i++;
|
||||||
$total += $obj->price;
|
$total += $obj->price;
|
||||||
}
|
}
|
||||||
if ($total>0) {
|
if ($total>0)
|
||||||
|
{
|
||||||
print '<tr class="liste_total"><td colspan="3" align="right">'.$langs->trans("Total")."</td><td align=\"right\">".price($total)."</td></tr>";
|
print '<tr class="liste_total"><td colspan="3" align="right">'.$langs->trans("Total")."</td><td align=\"right\">".price($total)."</td></tr>";
|
||||||
}
|
}
|
||||||
print "</table><br>";
|
print "</table><br>";
|
||||||
@ -255,8 +250,6 @@ if ($resql)
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
if ($num > 0 )
|
if ($num > 0 )
|
||||||
{
|
{
|
||||||
$var=true;
|
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td>'.$langs->trans("ProspectToContact").'</td></tr>';
|
print '<tr class="liste_titre"><td>'.$langs->trans("ProspectToContact").'</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@ -42,8 +42,8 @@ if ($user->societe_id > 0)
|
|||||||
if (! $user->rights->facture->creer)
|
if (! $user->rights->facture->creer)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$langs->load("companies");
|
// Load traductions files requiredby by page
|
||||||
$langs->load("orders");
|
$langs->loadLangs(array("companies", "orders"));
|
||||||
|
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
@ -155,14 +155,10 @@ if ($resql)
|
|||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$var=true;
|
|
||||||
|
|
||||||
while ($i < min($num,$limit))
|
while ($i < min($num,$limit))
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
|
|
||||||
|
|||||||
@ -39,9 +39,8 @@ if (! empty($conf->projet->enabled)) {
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
$langs->load('orders');
|
// Load traductions files requiredby by page
|
||||||
$langs->load('deliveries');
|
$langs->loadLangs(array("orders", "deliveries", "companies"));
|
||||||
$langs->load('companies');
|
|
||||||
|
|
||||||
if (! $user->rights->facture->creer)
|
if (! $user->rights->facture->creer)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
@ -655,7 +654,7 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error)
|
|||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
print '<form name="orders2invoice" action="orderstoinvoice.php" method="GET">';
|
print '<form name="orders2invoice" action="orderstoinvoice.php" method="GET">';
|
||||||
$var=true;
|
|
||||||
$generic_commande = new Commande($db);
|
$generic_commande = new Commande($db);
|
||||||
|
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user