Utilisation des modules pour numéroter les propales
This commit is contained in:
parent
e81822c34e
commit
d7039c4df0
@ -46,11 +46,7 @@ print_titre("Nouvelle proposition commerciale");
|
|||||||
*/
|
*/
|
||||||
if ($action == 'create')
|
if ($action == 'create')
|
||||||
{
|
{
|
||||||
if ( $objsoc->prefix_comm )
|
$numpr = propale_get_num();
|
||||||
{
|
|
||||||
|
|
||||||
$numpr = "PR-" . $objsoc->prefix_comm . "-" . strftime("%y%m%d", time());
|
|
||||||
|
|
||||||
$sql = "SELECT count(*) FROM llx_propal WHERE ref like '$numpr%'";
|
$sql = "SELECT count(*) FROM llx_propal WHERE ref like '$numpr%'";
|
||||||
|
|
||||||
if ( $db->query($sql) )
|
if ( $db->query($sql) )
|
||||||
@ -81,7 +77,7 @@ if ($action == 'create')
|
|||||||
print '<textarea name="note" wrap="soft" cols="30" rows="10"></textarea>';
|
print '<textarea name="note" wrap="soft" cols="30" rows="10"></textarea>';
|
||||||
|
|
||||||
print '<tr><td>Auteur</td><td>'.$user->fullname.'</td></tr>';
|
print '<tr><td>Auteur</td><td>'.$user->fullname.'</td></tr>';
|
||||||
print "<tr><td>Num</td><td><input name=\"ref\" value=\"$numpr\"></td></tr>\n";
|
print "<tr><td>Numéro</td><td><input name=\"ref\" value=\"$numpr\"></td></tr>\n";
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* Destinataire de la propale
|
* Destinataire de la propale
|
||||||
@ -189,7 +185,6 @@ if ($action == 'create')
|
|||||||
|
|
||||||
print_titre("Services/Produits");
|
print_titre("Services/Produits");
|
||||||
|
|
||||||
|
|
||||||
print '<table border="1" cellspacing="0">';
|
print '<table border="1" cellspacing="0">';
|
||||||
|
|
||||||
for ($i = 1 ; $i < 5 ; $i++)
|
for ($i = 1 ; $i < 5 ; $i++)
|
||||||
@ -207,17 +202,8 @@ if ($action == 'create')
|
|||||||
print '<input type="submit" value="Enregistrer">';
|
print '<input type="submit" value="Enregistrer">';
|
||||||
}
|
}
|
||||||
print "</form>";
|
print "</form>";
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print "Vous devez d'abord associer un prefixe commercial à cette société" ;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
$db->close();
|
$db->close();
|
||||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user