Ajout bouton "crer" dans les onglets d'un projet
This commit is contained in:
parent
ff5f770786
commit
f42bbfb422
@ -55,7 +55,7 @@ print_titre($langs->trans("NewProp"));
|
||||
|
||||
$html=new Form($db);
|
||||
|
||||
//récupération de l'id de projet
|
||||
// Récupération de l'id de projet
|
||||
$projetid = 0;
|
||||
if ($_GET["projetid"])
|
||||
{
|
||||
|
||||
@ -56,6 +56,12 @@ if ($user->societe_id > 0)
|
||||
$socidp = $user->societe_id;
|
||||
}
|
||||
|
||||
// Récupération de l'id de projet
|
||||
$projetid = 0;
|
||||
if ($_GET["projetid"])
|
||||
{
|
||||
$projetid = $_GET["projetid"];
|
||||
}
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@ -373,7 +379,7 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer)
|
||||
if ($conf->projet->enabled)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans('Project').'</td><td>';
|
||||
$html->select_projects($soc->id,'','projetid');
|
||||
$html->select_projects($soc->id,$projetid,'projetid');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
@ -63,6 +63,13 @@ if ($user->societe_id > 0)
|
||||
$socidp = $user->societe_id;
|
||||
}
|
||||
|
||||
// Récupération de l'id de projet
|
||||
$projetid = 0;
|
||||
if ($_GET["projetid"])
|
||||
{
|
||||
$projetid = $_GET["projetid"];
|
||||
}
|
||||
|
||||
// Nombre de ligne pour choix de produit/service prédéfinis
|
||||
$NBLINES=4;
|
||||
|
||||
@ -649,7 +656,7 @@ if ($_GET['action'] == 'create')
|
||||
$propal = New Propal($db);
|
||||
$propal->fetch($_GET['propalid']);
|
||||
$societe_id = $propal->soc_id;
|
||||
$projet=$propal->projetidp;
|
||||
$projetid=$propal->projetidp;
|
||||
|
||||
$soc->fetch($societe_id);
|
||||
$cond_reglement_id = $propal->cond_reglement_id;
|
||||
@ -662,7 +669,7 @@ if ($_GET['action'] == 'create')
|
||||
$commande = New Commande($db);
|
||||
$commande->fetch($_GET['commandeid']);
|
||||
$societe_id = $commande->soc_id;
|
||||
$projet=$commande-> projet_id;
|
||||
$projetid=$commande-> projet_id;
|
||||
$ref_client=$commande->ref_client;
|
||||
|
||||
$soc->fetch($societe_id);
|
||||
@ -676,7 +683,7 @@ if ($_GET['action'] == 'create')
|
||||
$contrat = New Contrat($db);
|
||||
$contrat->fetch($_GET['contratid']);
|
||||
$societe_id = $contrat->societe->id;
|
||||
$projet=$contrat->fk_projet;
|
||||
$projetid=$contrat->fk_projet;
|
||||
|
||||
$soc=$contrat->societe;
|
||||
$cond_reglement_id = $soc->cond_reglement;
|
||||
@ -768,7 +775,7 @@ if ($_GET['action'] == 'create')
|
||||
{
|
||||
$langs->load('projects');
|
||||
print '<tr><td>'.$langs->trans('Project').'</td><td colspan="2">';
|
||||
$html->select_projects($societe_id, $projet, 'projetid');
|
||||
$html->select_projects($societe_id, $projetid, 'projetid');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
@ -125,7 +125,7 @@ print '</table>';
|
||||
if ($conf->commande->enabled && $user->rights->commande->creer)
|
||||
{
|
||||
$langs->load("orders");
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/commande/fiche.php?socidp='.$projet->societe->id.'&action=create">'.$langs->trans("AddOrder").'</a>';
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/commande/fiche.php?socidp='.$projet->societe->id.'&action=create&projetid='.$projet->id.'">'.$langs->trans("AddOrder").'</a>';
|
||||
}
|
||||
print '</div>';
|
||||
|
||||
|
||||
@ -125,7 +125,7 @@ print '</table>';
|
||||
|
||||
if ($conf->facture->enabled && $user->rights->facture->creer)
|
||||
{
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture.php?socidp='.$projet->societe->id.'&action=create">'.$langs->trans("AddBill").'</a>';
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture.php?socidp='.$projet->societe->id.'&action=create&projetid='.$projet->id.'">'.$langs->trans("AddBill").'</a>';
|
||||
}
|
||||
print '</div>';
|
||||
|
||||
@ -138,7 +138,7 @@ if (sizeof($factures)>0 && is_array($factures))
|
||||
{
|
||||
print '<br>';
|
||||
|
||||
print_titre($langs->trans("ListInvoicesAssociatedProject");
|
||||
print_titre($langs->trans("ListInvoicesAssociatedProject"));
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user