On utilise plus le modifier
This commit is contained in:
parent
60d772c038
commit
9d2ea891c2
@ -92,12 +92,11 @@ class modPropale
|
|||||||
"insert into llx_rights_def values (20,'Tous les droits sur les propositions commerciales','propale','a',0);",
|
"insert into llx_rights_def values (20,'Tous les droits sur les propositions commerciales','propale','a',0);",
|
||||||
"insert into llx_rights_def values (21,'Lire les propositions commerciales','propale','r',1);",
|
"insert into llx_rights_def values (21,'Lire les propositions commerciales','propale','r',1);",
|
||||||
"insert into llx_rights_def values (22,'Créer modifier les propositions commerciales','propale','w',0);",
|
"insert into llx_rights_def values (22,'Créer modifier les propositions commerciales','propale','w',0);",
|
||||||
"insert into llx_rights_def values (23,'Modifier les propositions commerciales d\'autrui','propale','m',0);",
|
"insert into llx_rights_def values (24,'Valider les propositions commerciales','propale','d',0);",
|
||||||
"insert into llx_rights_def values (24,'Valider les propositions commerciales','propale','d',0);"
|
"insert into llx_rights_def values (25,'Clôturer les propositions commerciales','propale','d',0);",
|
||||||
"insert into llx_rights_def values (25,'Clôturer les propositions commerciales','propale','d',0);"
|
|
||||||
"insert into llx_rights_def values (26,'Supprimer les propositions commerciales','propale','d',0);"
|
"insert into llx_rights_def values (26,'Supprimer les propositions commerciales','propale','d',0);"
|
||||||
);
|
);
|
||||||
|
//"insert into llx_rights_def values (23,'Modifier les propositions commerciales d\'autrui','propale','m',0);",
|
||||||
for ($i = 0 ; $i < sizeof($sql) ; $i++)
|
for ($i = 0 ; $i < sizeof($sql) ; $i++)
|
||||||
{
|
{
|
||||||
$this->db->query($sql[$i]);
|
$this->db->query($sql[$i]);
|
||||||
|
|||||||
@ -25,6 +25,8 @@ require("../propal.class.php3");
|
|||||||
require("../facture.class.php3");
|
require("../facture.class.php3");
|
||||||
|
|
||||||
$user->getrights('produit');
|
$user->getrights('produit');
|
||||||
|
$user->getrights('propale');
|
||||||
|
$user->getrights('facture');
|
||||||
$mesg = '';
|
$mesg = '';
|
||||||
|
|
||||||
if (!$user->rights->produit->lire)
|
if (!$user->rights->produit->lire)
|
||||||
@ -330,112 +332,124 @@ if ($id && $action == '' && $product->envente)
|
|||||||
$propal = New Propal($db);
|
$propal = New Propal($db);
|
||||||
|
|
||||||
print '<table width="100%" border="0" cellpadding="3" cellspacing="0">';
|
print '<table width="100%" border="0" cellpadding="3" cellspacing="0">';
|
||||||
|
if($user->rights->propale->creer)
|
||||||
print '<tr><td width="50%" valign="top">';
|
|
||||||
print_titre("Ajouter ma proposition");
|
|
||||||
print '</td><td width="50%" valign="top">';
|
|
||||||
print_titre("Ajouter aux autres propositions");
|
|
||||||
print '</td></tr>';
|
|
||||||
print '<tr><td width="50%" valign="top">';
|
|
||||||
$sql = "SELECT s.nom, s.idp, p.rowid as propalid, p.price - p.remise as price, p.ref,".$db->pdate("p.datep")." as dp";
|
|
||||||
$sql .= " FROM llx_societe as s, llx_propal as p";
|
|
||||||
$sql .=" WHERE p.fk_soc = s.idp AND p.fk_statut = 0 AND p.fk_user_author = ".$user->id;
|
|
||||||
$sql .= " ORDER BY p.datec DESC, tms DESC";
|
|
||||||
|
|
||||||
if ( $db->query($sql) )
|
|
||||||
{
|
{
|
||||||
$num = $db->num_rows();
|
print '<tr><td width="50%" valign="top">';
|
||||||
$i = 0;
|
print_titre("Ajouter ma proposition") . '</td>';
|
||||||
print '<TABLE border="0" width="100%" cellspacing="0" cellpadding="4">';
|
if($user->rights->propale->creer)
|
||||||
$var=True;
|
|
||||||
while ($i < $num)
|
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object( $i);
|
print '<td width="50%" valign="top">';
|
||||||
|
print_titre("Ajouter aux autres propositions") . '</td>';
|
||||||
$var=!$var;
|
}
|
||||||
print "<TR $bc[$var]>";
|
print '</tr>';
|
||||||
print "<td><a href=\"../comm/propal.php3?propalid=$objp->propalid\">$objp->ref</a></TD>\n";
|
print '<tr><td width="50%" valign="top">';
|
||||||
print "<td><a href=\"../comm/fiche.php3?socid=$objp->idp\">$objp->nom</a></TD>\n";
|
$sql = "SELECT s.nom, s.idp, p.rowid as propalid, p.price - p.remise as price, p.ref,".$db->pdate("p.datep")." as dp";
|
||||||
print "<td>". strftime("%d %B %Y",$objp->dp)."</td>\n";
|
$sql .= " FROM llx_societe as s, llx_propal as p";
|
||||||
print '<form method="POST" action="fiche.php3?id='.$id.'">';
|
$sql .=" WHERE p.fk_soc = s.idp AND p.fk_statut = 0 AND p.fk_user_author = ".$user->id;
|
||||||
print '<input type="hidden" name="action" value="addinpropal">';
|
$sql .= " ORDER BY p.datec DESC, tms DESC";
|
||||||
print '<td><input type="hidden" name="propalid" value="'.$objp->propalid.'">';
|
|
||||||
print '<input type="text" name="qty" size="3" value="1">';
|
if ( $db->query($sql) )
|
||||||
print '</td><td>';
|
|
||||||
print '<input type="submit" value="Ajouter">';
|
|
||||||
print "</td>";
|
|
||||||
print '</form></tr>';
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
print "</table>";
|
|
||||||
$db->free();
|
|
||||||
}
|
|
||||||
|
|
||||||
print '</td><td width="50%" valign="top">';
|
|
||||||
|
|
||||||
$otherprop = $propal->liste_array(1, '<>'.$user->id);
|
|
||||||
if (sizeof($otherprop))
|
|
||||||
{
|
|
||||||
print '<form method="POST" action="fiche.php3?id='.$id.'">';
|
|
||||||
print '<input type="hidden" name="action" value="addinpropal">';
|
|
||||||
print '<table border="1" width="100%" cellpadding="3" cellspacing="0">';
|
|
||||||
print "<tr><td>Autres Propositions</td><td>";
|
|
||||||
$htmls->select_array("propalid", $otherprop);
|
|
||||||
print '</td><td>';
|
|
||||||
print '<input type="text" name="qty" size="3" value="1">';
|
|
||||||
print '</td><td>';
|
|
||||||
print '<input type="submit" value="Ajouter">';
|
|
||||||
print "</td></tr>";
|
|
||||||
print '</table></form>';
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
print '<tr><td width="50%" valign="top">';
|
|
||||||
print_titre("Ajouter ma facture");
|
|
||||||
print '</td><td width="50%" valign="top">';
|
|
||||||
print_titre("Ajouter aux autres factures");
|
|
||||||
print '</td></tr>';
|
|
||||||
print '<tr><td width="50%" valign="top">';
|
|
||||||
$sql = "SELECT s.nom, s.idp, f.rowid as factureid, f.facnumber,".$db->pdate("f.datef")." as df";
|
|
||||||
$sql .= " FROM llx_societe as s, llx_facture as f";
|
|
||||||
$sql .=" WHERE f.fk_soc = s.idp AND f.fk_statut = 0 AND f.fk_user_author = ".$user->id;
|
|
||||||
$sql .= " ORDER BY f.datec DESC, f.rowid DESC";
|
|
||||||
|
|
||||||
if ( $db->query($sql) )
|
|
||||||
{
|
|
||||||
$num = $db->num_rows();
|
|
||||||
$i = 0;
|
|
||||||
print '<TABLE border="0" width="100%" cellspacing="0" cellpadding="4">';
|
|
||||||
$var=True;
|
|
||||||
while ($i < $num)
|
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object( $i);
|
$num = $db->num_rows();
|
||||||
|
$i = 0;
|
||||||
$var=!$var;
|
print '<TABLE border="0" width="100%" cellspacing="0" cellpadding="4">';
|
||||||
print "<TR $bc[$var]>";
|
$var=True;
|
||||||
print "<td><a href=\"../compta/facture.php3?facid=$objp->factureid\">$objp->facnumber</a></TD>\n";
|
while ($i < $num)
|
||||||
print "<td><a href=\"../comm/fiche.php3?socid=$objp->idp\">$objp->nom</a></TD>\n";
|
{
|
||||||
print "<td>". strftime("%d %B %Y",$objp->df)."</td>\n";
|
$objp = $db->fetch_object( $i);
|
||||||
print '<form method="POST" action="fiche.php3?id='.$id.'">';
|
$var=!$var;
|
||||||
print '<input type="hidden" name="action" value="addinfacture">';
|
print "<TR $bc[$var]>";
|
||||||
print '<td><input type="hidden" name="factureid" value="'.$objp->factureid.'">';
|
print "<td><a href=\"../comm/propal.php3?propalid=$objp->propalid\">$objp->ref</a></TD>\n";
|
||||||
print '<input type="text" name="qty" size="3" value="1">';
|
print "<td><a href=\"../comm/fiche.php3?socid=$objp->idp\">$objp->nom</a></TD>\n";
|
||||||
print '</td><td>';
|
print "<td>". strftime("%d %B %Y",$objp->dp)."</td>\n";
|
||||||
print '<input type="submit" value="Ajouter">';
|
print '<form method="POST" action="fiche.php3?id='.$id.'">';
|
||||||
print "</td>";
|
print '<input type="hidden" name="action" value="addinpropal">';
|
||||||
print '</form></tr>';
|
print '<td><input type="hidden" name="propalid" value="'.$objp->propalid.'">';
|
||||||
$i++;
|
print '<input type="text" name="qty" size="3" value="1">';
|
||||||
}
|
print '</td><td>';
|
||||||
print "</table>";
|
print '<input type="submit" value="Ajouter">';
|
||||||
$db->free();
|
print "</td>";
|
||||||
}
|
print '</form></tr>';
|
||||||
else
|
$i++;
|
||||||
{
|
}
|
||||||
print $db->error() . "<br>" . $sql;
|
print "</table>";
|
||||||
}
|
$db->free();
|
||||||
print '</td><td width="50%" valign="top">';
|
}
|
||||||
print '</td></tr></table>';
|
|
||||||
|
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
|
if($user->rights->propale->creer)
|
||||||
|
{
|
||||||
|
print '<td width="50%" valign="top">';
|
||||||
|
|
||||||
|
$otherprop = $propal->liste_array(1, '<>'.$user->id);
|
||||||
|
if (sizeof($otherprop))
|
||||||
|
{
|
||||||
|
print '<form method="POST" action="fiche.php3?id='.$id.'">';
|
||||||
|
print '<input type="hidden" name="action" value="addinpropal">';
|
||||||
|
print '<table border="1" width="100%" cellpadding="3" cellspacing="0">';
|
||||||
|
print "<tr><td>Autres Propositions</td><td>";
|
||||||
|
$htmls->select_array("propalid", $otherprop);
|
||||||
|
print '</td><td>';
|
||||||
|
print '<input type="text" name="qty" size="3" value="1">';
|
||||||
|
print '</td><td>';
|
||||||
|
print '<input type="submit" value="Ajouter">';
|
||||||
|
print "</td></tr>";
|
||||||
|
print '</table></form>';
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
if($user->rights->facture->creer)
|
||||||
|
{
|
||||||
|
print '<tr><td width="50%" valign="top">';
|
||||||
|
print_titre("Ajouter ma facture");
|
||||||
|
print '</td><td width="50%" valign="top">';
|
||||||
|
print_titre("Ajouter aux autres factures");
|
||||||
|
print '</td></tr>';
|
||||||
|
print '<tr><td width="50%" valign="top">';
|
||||||
|
$sql = "SELECT s.nom, s.idp, f.rowid as factureid, f.facnumber,".$db->pdate("f.datef")." as df";
|
||||||
|
$sql .= " FROM llx_societe as s, llx_facture as f";
|
||||||
|
$sql .=" WHERE f.fk_soc = s.idp AND f.fk_statut = 0 AND f.fk_user_author = ".$user->id;
|
||||||
|
$sql .= " ORDER BY f.datec DESC, f.rowid DESC";
|
||||||
|
|
||||||
|
if ( $db->query($sql) )
|
||||||
|
{
|
||||||
|
$num = $db->num_rows();
|
||||||
|
$i = 0;
|
||||||
|
print '<TABLE border="0" width="100%" cellspacing="0" cellpadding="4">';
|
||||||
|
$var=True;
|
||||||
|
while ($i < $num)
|
||||||
|
{
|
||||||
|
$objp = $db->fetch_object( $i);
|
||||||
|
|
||||||
|
$var=!$var;
|
||||||
|
print "<TR $bc[$var]>";
|
||||||
|
print "<td><a href=\"../compta/facture.php3?facid=$objp->factureid\">$objp->facnumber</a></TD>\n";
|
||||||
|
print "<td><a href=\"../comm/fiche.php3?socid=$objp->idp\">$objp->nom</a></TD>\n";
|
||||||
|
print "<td>". strftime("%d %B %Y",$objp->df)."</td>\n";
|
||||||
|
print '<form method="POST" action="fiche.php3?id='.$id.'">';
|
||||||
|
print '<input type="hidden" name="action" value="addinfacture">';
|
||||||
|
print '<td><input type="hidden" name="factureid" value="'.$objp->factureid.'">';
|
||||||
|
print '<input type="text" name="qty" size="3" value="1">';
|
||||||
|
print '</td><td>';
|
||||||
|
print '<input type="submit" value="Ajouter">';
|
||||||
|
print "</td>";
|
||||||
|
print '</form></tr>';
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
print "</table>";
|
||||||
|
$db->free();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $db->error() . "<br>" . $sql;
|
||||||
|
}
|
||||||
|
print '</td><td width="50%" valign="top">';
|
||||||
|
print '</td></tr></table>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user