New: Add navigation arrows in supplier invoices
This commit is contained in:
parent
d28ce530e8
commit
3bcd18feb6
@ -2267,7 +2267,7 @@ else
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Discount
|
// Discounts
|
||||||
print '<tr><td>'.$langs->trans('Discounts').'</td><td colspan="5">';
|
print '<tr><td>'.$langs->trans('Discounts').'</td><td colspan="5">';
|
||||||
if ($soc->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_client);
|
if ($soc->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_client);
|
||||||
else print $langs->trans("CompanyHasNoRelativeDiscount");
|
else print $langs->trans("CompanyHasNoRelativeDiscount");
|
||||||
@ -2343,14 +2343,17 @@ else
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|
||||||
// Payments
|
/*
|
||||||
|
* List of payments
|
||||||
|
*/
|
||||||
|
|
||||||
$nbrows=8;
|
$nbrows=8;
|
||||||
if ($conf->global->FAC_USE_CUSTOMER_ORDER_REF) $nbrows++;
|
if ($conf->global->FAC_USE_CUSTOMER_ORDER_REF) $nbrows++;
|
||||||
if ($conf->projet->enabled) $nbrows++;
|
if ($conf->projet->enabled) $nbrows++;
|
||||||
|
|
||||||
print '<td rowspan="'.$nbrows.'" colspan="2" valign="top">';
|
print '<td rowspan="'.$nbrows.'" colspan="2" valign="top">';
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="nobordernopadding" width="100%">';
|
||||||
|
|
||||||
// List of payments already done
|
// List of payments already done
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -2362,10 +2365,6 @@ else
|
|||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
/*
|
|
||||||
* List of payments
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Payments already done (from deposits)
|
// Payments already done (from deposits)
|
||||||
/*
|
/*
|
||||||
$depositamount=0;
|
$depositamount=0;
|
||||||
|
|||||||
@ -179,7 +179,7 @@ if ($id > 0)
|
|||||||
|
|
||||||
// Reference du facture
|
// Reference du facture
|
||||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||||
print $facture->ref;
|
print $html->showrefnav($facture,'facid','',1,'rowid','ref',$morehtmlref);
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
// Ref supplier
|
// Ref supplier
|
||||||
|
|||||||
@ -20,11 +20,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/fourn/facture/document.php
|
* \file htdocs/fourn/facture/document.php
|
||||||
\ingroup facture, fournisseur
|
* \ingroup facture, fournisseur
|
||||||
\brief Page de gestion des documents attachees a une facture fournisseur
|
* \brief Page de gestion des documents attachees a une facture fournisseur
|
||||||
\version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require('./pre.inc.php');
|
require('./pre.inc.php');
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/fourn/fournisseur.facture.class.php');
|
require_once(DOL_DOCUMENT_ROOT.'/fourn/fournisseur.facture.class.php');
|
||||||
@ -66,42 +66,42 @@ if ($_POST['sendit'] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
{
|
{
|
||||||
$facture = new FactureFournisseur($db);
|
$facture = new FactureFournisseur($db);
|
||||||
if ($facture->fetch($facid))
|
if ($facture->fetch($facid))
|
||||||
{
|
{
|
||||||
$upload_dir = $conf->fournisseur->dir_output.'/facture/'.get_exdir($facture->id,2).$facture->id;
|
$upload_dir = $conf->fournisseur->dir_output.'/facture/'.get_exdir($facture->id,2).$facture->id;
|
||||||
|
|
||||||
if (! is_dir($upload_dir)) create_exdir($upload_dir);
|
if (! is_dir($upload_dir)) create_exdir($upload_dir);
|
||||||
|
|
||||||
if (is_dir($upload_dir))
|
if (is_dir($upload_dir))
|
||||||
{
|
{
|
||||||
if (dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . '/' . $_FILES['userfile']['name'],0) > 0)
|
if (dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . '/' . $_FILES['userfile']['name'],0) > 0)
|
||||||
{
|
{
|
||||||
$mesg = '<div class="ok">'.$langs->trans('FileTransferComplete').'</div>';
|
$mesg = '<div class="ok">'.$langs->trans('FileTransferComplete').'</div>';
|
||||||
//print_r($_FILES);
|
//print_r($_FILES);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Echec transfert (fichier depassant la limite ?)
|
// Echec transfert (fichier depassant la limite ?)
|
||||||
$mesg = '<div class="error">'.$langs->trans('ErrorFileNotUploaded').'</div>';
|
$mesg = '<div class="error">'.$langs->trans('ErrorFileNotUploaded').'</div>';
|
||||||
// print_r($_FILES);
|
// print_r($_FILES);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete
|
// Delete
|
||||||
if ($action=='delete')
|
if ($action=='delete')
|
||||||
{
|
{
|
||||||
$facid=$_GET["id"];
|
$facid=$_GET["id"];
|
||||||
|
|
||||||
$facture = new FactureFournisseur($db);
|
$facture = new FactureFournisseur($db);
|
||||||
if ($facture->fetch($facid))
|
if ($facture->fetch($facid))
|
||||||
{
|
{
|
||||||
$upload_dir = $conf->fournisseur->dir_output.'/facture/'.get_exdir($facture->id,2).$facture->id;
|
$upload_dir = $conf->fournisseur->dir_output.'/facture/'.get_exdir($facture->id,2).$facture->id;
|
||||||
|
|
||||||
$file = $upload_dir . '/' . $_GET['urlfile']; // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
$file = $upload_dir . '/' . $_GET['urlfile']; // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
||||||
dol_delete_file($file);
|
dol_delete_file($file);
|
||||||
$mesg = '<div class="ok">'.$langs->trans('FileWasRemoved').'</div>';
|
$mesg = '<div class="ok">'.$langs->trans('FileWasRemoved').'</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -109,14 +109,16 @@ if ($action=='delete')
|
|||||||
* Affichage
|
* Affichage
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$html = new Form($db);
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
if ($facid > 0)
|
if ($facid > 0)
|
||||||
{
|
{
|
||||||
$facture = new FactureFournisseur($db);
|
$facture = new FactureFournisseur($db);
|
||||||
if ($facture->fetch($facid))
|
if ($facture->fetch($facid))
|
||||||
{
|
{
|
||||||
$facture->fetch_fournisseur();
|
$facture->fetch_fournisseur();
|
||||||
|
|
||||||
$upload_dir = $conf->fournisseur->dir_output.'/facture/'.get_exdir($facture->id,2).$facture->id;
|
$upload_dir = $conf->fournisseur->dir_output.'/facture/'.get_exdir($facture->id,2).$facture->id;
|
||||||
|
|
||||||
@ -133,31 +135,33 @@ if ($facid > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
print '<table class="border"width="100%">';
|
print '<table class="border"width="100%">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<tr><td width="30%" nowrap="nowrap">'.$langs->trans("Ref").'</td><td colspan="3">'.$facture->ref.'</td>';
|
print '<tr><td width="30%" nowrap="nowrap">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||||
|
print $html->showrefnav($facture,'facid','',1,'rowid','ref',$morehtmlref);
|
||||||
|
print '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Ref supplier
|
// Ref supplier
|
||||||
print '<tr><td nowrap="nowrap">'.$langs->trans("RefSupplier").'</td><td colspan="3">'.$facture->ref_supplier.'</td>';
|
print '<tr><td nowrap="nowrap">'.$langs->trans("RefSupplier").'</td><td colspan="3">'.$facture->ref_supplier.'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Societe
|
// Societe
|
||||||
print '<tr><td>'.$langs->trans('Company').'</td><td colspan="3">'.$facture->fournisseur->getNomUrl(1).'</td></tr>';
|
print '<tr><td>'.$langs->trans('Company').'</td><td colspan="3">'.$facture->fournisseur->getNomUrl(1).'</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans('NbOfAttachedFiles').'</td><td colspan="3">'.sizeof($filearray).'</td></tr>';
|
print '<tr><td>'.$langs->trans('NbOfAttachedFiles').'</td><td colspan="3">'.sizeof($filearray).'</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans('TotalSizeOfAttachedFiles').'</td><td colspan="3">'.$totalsize.' '.$langs->trans('bytes').'</td></tr>';
|
print '<tr><td>'.$langs->trans('TotalSizeOfAttachedFiles').'</td><td colspan="3">'.$totalsize.' '.$langs->trans('bytes').'</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
if ($mesg) { print $mesg.'<br>'; }
|
if ($mesg) { print $mesg.'<br>'; }
|
||||||
|
|
||||||
|
|
||||||
// Affiche formulaire upload
|
// Affiche formulaire upload
|
||||||
$formfile=new FormFile($db);
|
$formfile=new FormFile($db);
|
||||||
$formfile->form_attach_new_file(DOL_URL_ROOT.'/fourn/facture/document.php?facid='.$facture->id,'',0,0,$user->rights->fournisseur->facture->creer);
|
$formfile->form_attach_new_file(DOL_URL_ROOT.'/fourn/facture/document.php?facid='.$facture->id,'',0,0,$user->rights->fournisseur->facture->creer);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -645,8 +645,6 @@ else
|
|||||||
if ($ret == 'html') print '<br>';
|
if ($ret == 'html') print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<table width="100%" class="notopnoleftnoright">';
|
|
||||||
print '<tr><td width="50%" valign="top" class="notopnoleft">';
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Facture
|
* Facture
|
||||||
@ -654,84 +652,70 @@ else
|
|||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<tr><td nowrap="nowrap">'.$langs->trans("Ref").'</td><td colspan="3">';
|
print '<tr><td nowrap="nowrap" width="20%">'.$langs->trans("Ref").'</td><td colspan="4">';
|
||||||
print $html->showrefnav($fac,'facid','',1,'rowid','ref',$morehtmlref);
|
print $html->showrefnav($fac,'facid','',1,'rowid','ref',$morehtmlref);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Ref supplier
|
// Ref supplier
|
||||||
print '<tr><td nowrap="nowrap">'.$langs->trans("RefSupplier").'</td><td colspan="3">'.$fac->ref_supplier.'</td>';
|
print '<tr><td nowrap="nowrap">'.$langs->trans("RefSupplier").'</td><td colspan="4">'.$fac->ref_supplier.'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Societe
|
// Third party
|
||||||
print '<tr><td>'.$langs->trans('Company').'</td><td colspan="2">'.$societe->getNomUrl(1).'</td>';
|
print '<tr><td>'.$langs->trans('Company').'</td><td colspan="4">'.$societe->getNomUrl(1).' (<a href="index.php?socid='.$fac->socid.'">'.$langs->trans('OtherBills').'</a>)</td></tr>';
|
||||||
print '<td align="right"><a href="index.php?socid='.$fac->socid.'">'.$langs->trans('OtherBills').'</a></td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
|
// Type
|
||||||
|
print '<tr><td>'.$langs->trans('Type').'</td><td colspan="4">';
|
||||||
|
print $fac->getLibType();
|
||||||
|
if ($fac->type == 1)
|
||||||
|
{
|
||||||
|
$facreplaced=new FactureFournisseur($db);
|
||||||
|
$facreplaced->fetch($fac->fk_facture_source);
|
||||||
|
print ' ('.$langs->transnoentities("ReplaceInvoice",$facreplaced->getNomUrl(1)).')';
|
||||||
|
}
|
||||||
|
if ($fac->type == 2)
|
||||||
|
{
|
||||||
|
$facusing=new FactureFournisseur($db);
|
||||||
|
$facusing->fetch($fac->fk_facture_source);
|
||||||
|
print ' ('.$langs->transnoentities("CorrectInvoice",$facusing->getNomUrl(1)).')';
|
||||||
|
}
|
||||||
|
|
||||||
|
$facidavoir=$fac->getListIdAvoirFromInvoice();
|
||||||
|
if (sizeof($facidavoir) > 0)
|
||||||
|
{
|
||||||
|
print ' ('.$langs->transnoentities("InvoiceHasAvoir");
|
||||||
|
$i=0;
|
||||||
|
foreach($facidavoir as $id)
|
||||||
|
{
|
||||||
|
if ($i==0) print ' ';
|
||||||
|
else print ',';
|
||||||
|
$facavoir=new FactureFournisseur($db);
|
||||||
|
$facavoir->fetch($id);
|
||||||
|
print $facavoir->getNomUrl(1);
|
||||||
|
}
|
||||||
|
print ')';
|
||||||
|
}
|
||||||
|
if ($facidnext > 0)
|
||||||
|
{
|
||||||
|
$facthatreplace=new FactureFournisseur($db);
|
||||||
|
$facthatreplace->fetch($facidnext);
|
||||||
|
print ' ('.$langs->transnoentities("ReplacedByInvoice",$facthatreplace->getNomUrl(1)).')';
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|
||||||
|
// Label
|
||||||
print '<tr><td>'.$langs->trans('Label').'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans('Label').'</td><td colspan="3">';
|
||||||
print $fac->libelle;
|
print $fac->libelle;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans('Date').'</td><td colspan="3" nowrap="nowrap">';
|
|
||||||
print dol_print_date($fac->datep,'daytext').'</td></tr>';
|
|
||||||
|
|
||||||
print '<tr>';
|
|
||||||
print '<td>'.$langs->trans('DateEcheance').'</td><td colspan="3">';
|
|
||||||
print dol_print_date($fac->date_echeance,'daytext');
|
|
||||||
if (($fac->paye == 0) && ($fac->statut > 0) && $fac->date_echeance < ($now - $conf->facture->fournisseur->warning_delay)) print img_picto($langs->trans("Late"),"warning");
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Status
|
|
||||||
$alreadypayed=$fac->getSommePaiement();
|
|
||||||
print '<tr><td>'.$langs->trans('Status').'</td><td colspan="3">'.$fac->getLibStatut(4,$alreadypayed).'</td></tr>';
|
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans('AmountHT').'</td><td><b>'.price($fac->total_ht).'</b></td><td colspan="2" align="left">'.$langs->trans('Currency'.$conf->monnaie).'</td></tr>';
|
|
||||||
print '<tr><td>'.$langs->trans('AmountVAT').'</td><td>'.price($fac->total_tva).'</td><td colspan="2" align="left">'.$langs->trans('Currency'.$conf->monnaie).'</td></tr>';
|
|
||||||
print '<tr><td>'.$langs->trans('AmountTTC').'</td><td>'.price($fac->total_ttc).'</td><td colspan="2" align="left">'.$langs->trans('Currency'.$conf->monnaie).'</td></tr>';
|
|
||||||
|
|
||||||
// Project
|
|
||||||
if ($conf->projet->enabled)
|
|
||||||
{
|
|
||||||
$langs->load('projects');
|
|
||||||
print '<tr>';
|
|
||||||
print '<td>';
|
|
||||||
|
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
|
||||||
print $langs->trans('Project');
|
|
||||||
print '</td>';
|
|
||||||
if ($_GET['action'] != 'classer')
|
|
||||||
{
|
|
||||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=classer&facid='.$fac->id.'">';
|
|
||||||
print img_edit($langs->trans('SetProject'),1);
|
|
||||||
print '</a></td>';
|
|
||||||
}
|
|
||||||
print '</tr></table>';
|
|
||||||
|
|
||||||
print '</td><td colspan="3">';
|
|
||||||
if ($_GET['action'] == 'classer')
|
|
||||||
{
|
|
||||||
$html->form_project($_SERVER['PHP_SELF'].'?facid='.$fac->id,$fac->socid,$fac->fk_project,'projetid');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$html->form_project($_SERVER['PHP_SELF'].'?facid='.$fac->id,$fac->socid,$fac->fk_project,'none');
|
|
||||||
}
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print '</table>';
|
|
||||||
|
|
||||||
print '</td><td valign="top" class="notopnoleftnoright">';
|
|
||||||
|
|
||||||
|
|
||||||
print '<table width="100%" class="noborder">';
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* List of payments
|
* List of payments
|
||||||
*/
|
*/
|
||||||
print '<tr><td colspan="2">';
|
$nbrows=7;
|
||||||
|
if ($conf->projet->enabled) $nbrows++;
|
||||||
|
|
||||||
|
print '<td rowspan="'.$nbrows.'" valign="top">';
|
||||||
$sql = 'SELECT '.$db->pdate('datep').' as dp, pf.amount,';
|
$sql = 'SELECT '.$db->pdate('datep').' as dp, pf.amount,';
|
||||||
$sql .= ' c.libelle as paiement_type, p.num_paiement, p.rowid';
|
$sql .= ' c.libelle as paiement_type, p.num_paiement, p.rowid';
|
||||||
$sql .= ' FROM '.MAIN_DB_PREFIX.'paiementfourn as p';
|
$sql .= ' FROM '.MAIN_DB_PREFIX.'paiementfourn as p';
|
||||||
@ -745,7 +729,7 @@ else
|
|||||||
{
|
{
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
$i = 0; $totalpaye = 0;
|
$i = 0; $totalpaye = 0;
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="nobordernopadding" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans('Payments').'</td>';
|
print '<td>'.$langs->trans('Payments').'</td>';
|
||||||
print '<td>'.$langs->trans('Type').'</td>';
|
print '<td>'.$langs->trans('Type').'</td>';
|
||||||
@ -796,12 +780,59 @@ else
|
|||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
|
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
print '<tr><td>'.$langs->trans('Date').'</td><td colspan="3" nowrap="nowrap">';
|
||||||
|
print dol_print_date($fac->datep,'daytext').'</td></tr>';
|
||||||
|
|
||||||
|
print '<tr>';
|
||||||
|
print '<td>'.$langs->trans('DateEcheance').'</td><td colspan="3">';
|
||||||
|
print dol_print_date($fac->date_echeance,'daytext');
|
||||||
|
if (($fac->paye == 0) && ($fac->statut > 0) && $fac->date_echeance < ($now - $conf->facture->fournisseur->warning_delay)) print img_picto($langs->trans("Late"),"warning");
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print '</table>';
|
|
||||||
|
|
||||||
|
// Status
|
||||||
|
$alreadypayed=$fac->getSommePaiement();
|
||||||
|
print '<tr><td>'.$langs->trans('Status').'</td><td colspan="3">'.$fac->getLibStatut(4,$alreadypayed).'</td></tr>';
|
||||||
|
|
||||||
|
print '<tr><td>'.$langs->trans('AmountHT').'</td><td><b>'.price($fac->total_ht).'</b></td><td colspan="2" align="left">'.$langs->trans('Currency'.$conf->monnaie).'</td></tr>';
|
||||||
|
print '<tr><td>'.$langs->trans('AmountVAT').'</td><td>'.price($fac->total_tva).'</td><td colspan="2" align="left">'.$langs->trans('Currency'.$conf->monnaie).'</td></tr>';
|
||||||
|
print '<tr><td>'.$langs->trans('AmountTTC').'</td><td>'.price($fac->total_ttc).'</td><td colspan="2" align="left">'.$langs->trans('Currency'.$conf->monnaie).'</td></tr>';
|
||||||
|
|
||||||
|
// Project
|
||||||
|
if ($conf->projet->enabled)
|
||||||
|
{
|
||||||
|
$langs->load('projects');
|
||||||
|
print '<tr>';
|
||||||
|
print '<td>';
|
||||||
|
|
||||||
|
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||||
|
print $langs->trans('Project');
|
||||||
|
print '</td>';
|
||||||
|
if ($_GET['action'] != 'classer')
|
||||||
|
{
|
||||||
|
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=classer&facid='.$fac->id.'">';
|
||||||
|
print img_edit($langs->trans('SetProject'),1);
|
||||||
|
print '</a></td>';
|
||||||
|
}
|
||||||
|
print '</tr></table>';
|
||||||
|
|
||||||
|
print '</td><td colspan="3">';
|
||||||
|
if ($_GET['action'] == 'classer')
|
||||||
|
{
|
||||||
|
$html->form_project($_SERVER['PHP_SELF'].'?facid='.$fac->id,$fac->socid,$fac->fk_project,'projetid');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$html->form_project($_SERVER['PHP_SELF'].'?facid='.$fac->id,$fac->socid,$fac->fk_project,'none');
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
print '</td></tr>';
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -19,11 +19,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/fourn/facture/note.php
|
* \file htdocs/fourn/facture/note.php
|
||||||
\ingroup facture
|
* \ingroup facture
|
||||||
\brief Fiche de notes sur une facture fournisseur
|
* \brief Fiche de notes sur une facture fournisseur
|
||||||
\version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/lib/fourn.lib.php');
|
require_once(DOL_DOCUMENT_ROOT.'/lib/fourn.lib.php');
|
||||||
@ -49,7 +49,7 @@ $fac->fetch($_GET["facid"]);
|
|||||||
if ($_POST["action"] == 'update_public' && $user->rights->facture->creer)
|
if ($_POST["action"] == 'update_public' && $user->rights->facture->creer)
|
||||||
{
|
{
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
$res=$fac->update_note_public($_POST["note_public"],$user);
|
$res=$fac->update_note_public($_POST["note_public"],$user);
|
||||||
if ($res < 0)
|
if ($res < 0)
|
||||||
{
|
{
|
||||||
@ -65,7 +65,7 @@ if ($_POST["action"] == 'update_public' && $user->rights->facture->creer)
|
|||||||
if ($_POST["action"] == 'update' && $user->rights->fournisseur->facture->creer)
|
if ($_POST["action"] == 'update' && $user->rights->fournisseur->facture->creer)
|
||||||
{
|
{
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
$res=$fac->update_note($_POST["note"],$user);
|
$res=$fac->update_note($_POST["note"],$user);
|
||||||
if ($res < 0)
|
if ($res < 0)
|
||||||
{
|
{
|
||||||
@ -80,14 +80,14 @@ if ($_POST["action"] == 'update' && $user->rights->fournisseur->facture->creer)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/*
|
||||||
/* Affichage fiche */
|
* View
|
||||||
/******************************************************************************/
|
*/
|
||||||
|
|
||||||
llxHeader();
|
|
||||||
|
|
||||||
$html = new Form($db);
|
$html = new Form($db);
|
||||||
|
|
||||||
|
llxHeader();
|
||||||
|
|
||||||
if ($_GET["facid"])
|
if ($_GET["facid"])
|
||||||
{
|
{
|
||||||
$fac->fetch_fournisseur();
|
$fac->fetch_fournisseur();
|
||||||
@ -100,7 +100,9 @@ if ($_GET["facid"])
|
|||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<tr><td width="30%" nowrap="nowrap">'.$langs->trans("Ref").'</td><td colspan="3">'.$fac->ref.'</td>';
|
print '<tr><td width="30%" nowrap="nowrap">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||||
|
print $html->showrefnav($fac,'facid','',1,'rowid','ref',$morehtmlref);
|
||||||
|
print '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Ref supplier
|
// Ref supplier
|
||||||
@ -148,7 +150,7 @@ if ($_GET["facid"])
|
|||||||
}
|
}
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user