diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index d978ddb62e5..42baaab436d 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -67,6 +67,11 @@ $confirm=GETPOST('confirm', 'alpha'); $toselect = GETPOST('toselect', 'array'); $contextpage=GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'invoicelist'; +if ($contextpage == 'poslist') +{ + $_GET['optioncss'] = 'print'; +} + $lineid=GETPOST('lineid', 'int'); $userid=GETPOST('userid', 'int'); $search_product_category=GETPOST('search_product_category', 'int'); @@ -950,7 +955,12 @@ if ($resql) $totalpay = $facturestatic->total_ttc - $remaintopay; } - print '
| ';
- print $facturestatic->getNomUrl(1, '', 200, 0, '', 0, 1);
+ if ($contextpage == 'poslist')
+ {
+ print $obj->ref;
+ }
+ else
+ {
+ print $facturestatic->getNomUrl(1, '', 200, 0, '', 0, 1);
+ }
print empty($obj->increment)?'':' ('.$obj->increment.')';
$filename=dol_sanitizeFileName($obj->ref);
diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang
index 4c71ce4b564..dd077e54045 100644
--- a/htdocs/langs/en_US/cashdesk.lang
+++ b/htdocs/langs/en_US/cashdesk.lang
@@ -61,4 +61,5 @@ NoPaimementModesDefined=No paiment mode defined in TakePOS configuration
TicketVatGrouped=Group VAT by rate in tickets
AutoPrintTickets=Automatically print tickets
EnableBarOrRestaurantFeatures=Enable features for Bar or Restaurant
-ConfirmDeletionOfThisPOSSale=Do your confirm the deletion of this current sale ?
\ No newline at end of file
+ConfirmDeletionOfThisPOSSale=Do your confirm the deletion of this current sale ?
+History=History
\ No newline at end of file
diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php
index 09a60ffc3e9..2fc99b1a587 100644
--- a/htdocs/takepos/invoice.php
+++ b/htdocs/takepos/invoice.php
@@ -171,6 +171,13 @@ if ($action == 'valid' && $user->rights->facture->creer)
}
}
+if ($action == 'history')
+{
+ $placeid = GETPOST('placeid', 'int');
+ $invoice = new Facture($db);
+ $invoice->fetch($placeid);
+}
+
if (($action=="addline" || $action=="freezone") && $placeid == 0)
{
$invoice->socid = $conf->global->CASHDESK_ID_THIRDPARTY;
@@ -336,7 +343,7 @@ if ($action == "order" and $placeid != 0)
}
$sectionwithinvoicelink='';
-if ($action=="valid")
+if ($action=="valid" || $action=="history")
{
$sectionwithinvoicelink.=''."\n";
$sectionwithinvoicelink.='';
diff --git a/htdocs/takepos/takepos.php b/htdocs/takepos/takepos.php
index e5991b50702..143c6abf063 100644
--- a/htdocs/takepos/takepos.php
+++ b/htdocs/takepos/takepos.php
@@ -352,6 +352,12 @@ function Customer() {
$.colorbox({href:"../societe/list.php?contextpage=poslist&nomassaction=1&place="+place, width:"90%", height:"80%", transition:"none", iframe:"true", title:"trans("Customer");?>"});
}
+function History()
+{
+ console.log("Open box to select the history");
+ $.colorbox({href:"../compta/facture/list.php?contextpage=poslist", width:"90%", height:"80%", transition:"none", iframe:"true", title:"trans("History");?>"});
+}
+
function CloseBill() {
invoiceid = $("#invoiceid").val();
console.log("Open popup to enter payment on invoiceid="+invoiceid);
@@ -607,6 +613,7 @@ else
}
$menus[$r++]=array('title'=>' '.$langs->trans("Customer").' ', 'action'=>'Customer();');
+$menus[$r++]=array('title'=>''.$langs->trans("History").' ', 'action'=>'History();');
$menus[$r++]=array('title'=>''.$langs->trans("FreeZone").' ', 'action'=>'FreeZone();');
$menus[$r++]=array('title'=>''.$langs->trans("Payment").' ', 'action'=>'CloseBill();');
|