Picto lgrement diffrent pour facture remplacement, avoir ou standard

This commit is contained in:
Laurent Destailleur 2006-10-20 21:20:42 +00:00
parent 6ee57fec28
commit cac9c8b79f
14 changed files with 19 additions and 4 deletions

View File

@ -120,7 +120,7 @@ if ($conf->facture->enabled)
*/ */
if ($conf->facture->enabled && $user->rights->facture->lire) if ($conf->facture->enabled && $user->rights->facture->lire)
{ {
$sql = "SELECT f.facnumber, f.rowid, f.total_ttc, s.nom, s.idp"; $sql = "SELECT f.facnumber, f.rowid, f.total_ttc, f.type, s.nom, s.idp";
if (!$user->rights->commercial->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user "; if (!$user->rights->commercial->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user ";
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."societe as s"; $sql .= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."societe as s";
if (!$user->rights->commercial->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; if (!$user->rights->commercial->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
@ -151,7 +151,8 @@ if ($conf->facture->enabled && $user->rights->facture->lire)
$var=!$var; $var=!$var;
print '<tr '.$bc[$var].'><td nowrap>'; print '<tr '.$bc[$var].'><td nowrap>';
$facturestatic->ref=$obj->facnumber; $facturestatic->ref=$obj->facnumber;
$facturestatic->id=$obj->idp; $facturestatic->id=$obj->rowid;
$facturestatic->type=$obj->type;
print $facturestatic->getNomUrl(1,''); print $facturestatic->getNomUrl(1,'');
print '</td>'; print '</td>';
print '<td><a href="fiche.php?socid='.$obj->idp.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($obj->nom,16).'</a></td>'; print '<td><a href="fiche.php?socid='.$obj->idp.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($obj->nom,16).'</a></td>';
@ -359,7 +360,8 @@ if ($conf->facture->enabled && $user->rights->facture->lire)
{ {
$facstatic=new Facture($db); $facstatic=new Facture($db);
$sql = "SELECT f.rowid, f.facnumber, f.fk_statut, f.total, f.total_ttc, ".$db->pdate("f.date_lim_reglement")." as datelimite,"; $sql = "SELECT f.rowid, f.facnumber, f.fk_statut, f.type, f.total, f.total_ttc, ";
$sql.= $db->pdate("f.date_lim_reglement")." as datelimite,";
$sql.= " sum(pf.amount) as am,"; $sql.= " sum(pf.amount) as am,";
$sql.= " s.nom, s.idp"; $sql.= " s.nom, s.idp";
if (!$user->rights->commercial->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user "; if (!$user->rights->commercial->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user ";
@ -400,6 +402,7 @@ if ($conf->facture->enabled && $user->rights->facture->lire)
print '<td nowrap>'; print '<td nowrap>';
$facturestatic->ref=$obj->facnumber; $facturestatic->ref=$obj->facnumber;
$facturestatic->id=$obj->rowid; $facturestatic->id=$obj->rowid;
$facturestatic->type=$obj->type;
print $facturestatic->getNomUrl(1,''); print $facturestatic->getNomUrl(1,'');
if ($obj->datelimite < (time() - $conf->facture->client->warning_delay)) print img_warning($langs->trans("Late")); if ($obj->datelimite < (time() - $conf->facture->client->warning_delay)) print img_warning($langs->trans("Late"));
print '</td>'; print '</td>';

View File

@ -361,8 +361,16 @@ class Facture extends CommonObject
$lien = '<a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$this->id.'">'; $lien = '<a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$this->id.'">';
$lienfin='</a>'; $lienfin='</a>';
$picto='bill';
if ($this->type == 1) $picto.='r';
if ($this->type == 2) $picto.='a';
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowInvoice"),'bill').$lienfin.' '); $label=$langs->trans("ShowInvoice");
if ($this->type == 1) $label=$langs->trans("ShowInvoiceReplace");
if ($this->type == 2) $label=$langs->trans("ShowInvoiceAvoir");
if ($withpicto) $result.=($lien.img_object($label,$picto).$lienfin.' ');
$result.=$lien.$this->ref.$lienfin; $result.=$lien.$this->ref.$lienfin;
return $result; return $result;
} }

View File

@ -120,6 +120,8 @@ NumberOfBills=Nb of invoices
NumberOfBillsByMonth=Nb of invoices by month NumberOfBillsByMonth=Nb of invoices by month
ShowBill=Show invoice ShowBill=Show invoice
ShowInvoice=Show invoice ShowInvoice=Show invoice
ShowInvoiceReplace=Show replacing invoice
ShowInvoiceAvoir=Show avoir invoice
ShowPayment=Show payment ShowPayment=Show payment
File=File File=File
AlreadyPayed=Already payed AlreadyPayed=Already payed

View File

@ -120,6 +120,8 @@ NumberOfBills=Nb de factures
NumberOfBillsByMonth=Nb de factures par mois NumberOfBillsByMonth=Nb de factures par mois
ShowBill=Afficher facture ShowBill=Afficher facture
ShowInvoice=Afficher facture ShowInvoice=Afficher facture
ShowInvoiceReplace=Afficher facture de remplacement
ShowInvoiceAvoir=Afficher facture avoir
ShowPayment=Afficher paiement ShowPayment=Afficher paiement
File=Fichier File=Fichier
AlreadyPayed=Déjà réglé AlreadyPayed=Déjà réglé

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB