diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php
index 8c533f0f547..3c8ad35e141 100644
--- a/htdocs/fourn/card.php
+++ b/htdocs/fourn/card.php
@@ -31,6 +31,7 @@
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
+require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php';
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
@@ -343,6 +344,78 @@ if ($object->id > 0)
print '';
}
+
+ /*
+ * Last supplier proposal
+ */
+ $proposalstatic = new SupplierProposal($db);
+
+ if ($user->rights->supplier_proposal->lire)
+ {
+ $sql = "SELECT p.rowid, p.ref, p.date_valid as dc, p.fk_statut, p.total_ht, p.tva as total_tva, p.total as total_ttc";
+ $sql.= " FROM ".MAIN_DB_PREFIX."supplier_proposal as p ";
+ $sql.= " WHERE p.fk_soc =".$object->id;
+ $sql.= " AND p.entity =".$conf->entity;
+ $sql.= " ORDER BY p.date_valid DESC";
+ $sql.= " ".$db->plimit($MAXLIST);
+
+ $resql=$db->query($sql);
+ if ($resql)
+ {
+ $i = 0 ;
+ $num = $db->num_rows($resql);
+
+ if ($num > 0)
+ {
+ print '
';
+
+ print '';
+ print '| ';
+ print '';
+ print ' |
';
+ }
+
+ $var = True;
+ while ($i < $num && $i <= $MAXLIST)
+ {
+ $obj = $db->fetch_object($resql);
+ $var=!$var;
+
+ print "";
+ print '| ';
+ $proposalstatic->id = $obj->rowid;
+ $proposalstatic->ref = $obj->ref;
+ $proposalstatic->total_ht = $obj->total_ht;
+ $proposalstatic->total_tva = $obj->total_tva;
+ $proposalstatic->total_ttc = $obj->total_ttc;
+ print $proposalstatic->getNomUrl(1);
+ print ' | ';
+ print '';
+ if ($obj->dc)
+ {
+ print dol_print_date($db->jdate($obj->dc),'day');
+ }
+ else
+ {
+ print "-";
+ }
+ print ' | ';
+ print ''.$proposalstatic->LibStatut($obj->fk_statut,5).' | ';
+ print '
';
+ $i++;
+ }
+ $db->free($resql);
+
+ if ($num >0) print "
";
+ }
+ else
+ {
+ dol_print_error($db);
+ }
+ }
/*
* Last supplier orders
@@ -441,7 +514,6 @@ if ($object->id > 0)
/*
* Last supplier invoices
*/
- $MAXLIST=5;
$langs->load('bills');
$facturestatic = new FactureFournisseur($db);
diff --git a/htdocs/langs/en_US/supplier_proposal.lang b/htdocs/langs/en_US/supplier_proposal.lang
index 988e377d4df..394d4cabe01 100644
--- a/htdocs/langs/en_US/supplier_proposal.lang
+++ b/htdocs/langs/en_US/supplier_proposal.lang
@@ -59,3 +59,5 @@ DefaultModelSupplierProposalClosed=Default template when closing a price request
ListOfSupplierProposal=List of supplier proposal requests
SupplierProposalsToClose=Supplier proposals to close
SupplierProposalsToProcess=Supplier proposals to process
+LastSupplierProposals=Last price requests
+AllPriceRequests=All requests
\ No newline at end of file
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index a75c808b69d..733c190fba6 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -730,6 +730,11 @@ div.ficheaddleft {
}
}
+/* For table into table into card */
+div.ficheaddleft tr.liste_titre:first-child td table.nobordernopadding td {
+ padding: 0 0 0 0;
+}
+
.containercenter {
display : table;
margin : 0px auto;
@@ -2235,7 +2240,7 @@ table.liste tr, table.noborder tr, div.noborder form {
min-height: 20px;
}
table.liste th, table.noborder th, table.noborder tr.liste_titre td, table.noborder tr.box_titre td {
- padding: 10px 2px 10px 3px; /* t r b l */
+ padding: 8px 2px 8px 3px; /* t r b l */
}
tr.box_titre .nobordernopadding td { padding: 0px ! important; }
table.liste td, table.noborder td, div.noborder form, div.noborder form div {
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index 68fd5d25e5f..3454c20ff09 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -785,6 +785,15 @@ div.ficheaddleft {
}
}
+/* For table into table into card */
+div.ficheaddleft tr.liste_titre:first-child td table.nobordernopadding td {
+ padding: 0 0 0 0;
+}
+
+table.noborder tr.liste_titre td {
+ padding: 3px !important;
+}
+
.containercenter {
display : table;
margin : 0px auto;
@@ -844,7 +853,7 @@ img.photoref {
.underrefbanner {
}
.underbanner {
- border-bottom: 2px solid rgb();;
+ border-bottom: 1px solid rgb();;
}
@@ -1874,7 +1883,10 @@ span.tabspan {
/* Boutons actions */
/* ============================================================================== */
-div.divButAction { margin-bottom: 1.4em; }
+div.divButAction {
+ margin-bottom: 1.4em;
+ vertical-align: top;
+}
span.butAction, span.butActionDelete {
cursor: pointer;
@@ -2129,7 +2141,7 @@ table.noborder tr, div.noborder form {
}
table.liste th, table.noborder th, table.noborder tr.liste_titre td {
- padding: 12px 2px 12px 3px; /* t r b l */
+ padding: 8px 2px 8px 3px; /* t r b l */
}
table.noborder td, div.noborder form, div.noborder form div {
padding: 4px 2px 4px 3px; /* t r b l */