TavernerPOS - Source Code

Clone: 

git clone http://www.librarysmith.co.uk/tavernerPOS

 

Index » tavernerPOS : Commitdiff 69d9cf

Start Fixing the incorrect Tax calculations when tax is inclusive.

Matthew Smith [16-03-29 11:28]
Start Fixing the incorrect Tax calculations when tax is inclusive.
diff --git a/src/com/floreantpos/model/DrawerPullReport.java b/src/com/floreantpos/model/DrawerPullReport.java
index 5b28ebe..81a560d 100644
--- a/src/com/floreantpos/model/DrawerPullReport.java
+++ b/src/com/floreantpos/model/DrawerPullReport.java
@@ -3,6 +3,7 @@ package com.floreantpos.model;
 import java.util.HashSet;
 import java.util.Set;

+import com.floreantpos.main.Application;
 import com.floreantpos.model.base.BaseDrawerPullReport;

 public class DrawerPullReport extends BaseDrawerPullReport {
@@ -70,8 +71,10 @@ public class DrawerPullReport extends BaseDrawerPullReport {
 	}

 	public void calculate() {
-		setTotalRevenue(getNetSales() + getSalesTax());
-		setGrossReceipts(getTotalRevenue() + getChargedTips());
+
+		setTotalRevenue(getNetSales() + getSalesTax());
+
+	    setGrossReceipts(getTotalRevenue() + getChargedTips());

 		double total = getCashReceiptAmount() + getCreditCardReceiptAmount() + getDebitCardReceiptAmount() + getGiftCertReturnAmount()
 				+ getGiftCertChangeAmount() - getCashBack() - getRefundAmount();
diff --git a/src/com/floreantpos/model/base/BaseTicket.java b/src/com/floreantpos/model/base/BaseTicket.java
index 1197206..9d87efe 100644
--- a/src/com/floreantpos/model/base/BaseTicket.java
+++ b/src/com/floreantpos/model/base/BaseTicket.java
@@ -2,6 +2,8 @@ package com.floreantpos.model.base;

 import java.io.Serializable;

+import com.floreantpos.main.Application;
+


 /**
@@ -362,7 +364,10 @@ public abstract class BaseTicket  implements Comparable, Serializable {
 	 * @param subtotalAmount the SUB_TOTAL value
 	 */
 	public void setSubtotalAmount (java.lang.Double subtotalAmount) {
-		this.subtotalAmount = subtotalAmount;
+		if (!Application.getInstance().isPriceIncludesTax())
+			this.subtotalAmount = subtotalAmount;
+		else
+			this.subtotalAmount = subtotalAmount - getTaxAmount();
 	}


diff --git a/src/com/floreantpos/print/DrawerpullReportService.java b/src/com/floreantpos/print/DrawerpullReportService.java
index 20bafb4..d8654dc 100644
--- a/src/com/floreantpos/print/DrawerpullReportService.java
+++ b/src/com/floreantpos/print/DrawerpullReportService.java
@@ -216,7 +216,9 @@ public class DrawerpullReportService {
 		}

 		report.setTicketCount(ticketCount);
-		report.setNetSales(subtotal - discount);
+
+
+	    report.setNetSales(subtotal - (discount));
 		report.setSalesTax(salesTax);
 		report.setChargedTips(tips);
 	}

Comments   

# Kitchen-receipt not printingJulio Ponce 2016-08-01 16:37
Good day I was Wondering if the button add in home screen to print kitchen receipt is avaliable in version 1.4, after clicking SAVE button wont print kitchen receipt, any help you can provide is welcome.

Best regards Julio
Reply | Reply with quote | Quote
# RE: Kitchen-receipt not printingMatt Smith 2016-08-01 17:52
Quoting Julio Ponce:
Good day I was Wondering if the button add in home screen to print kitchen receipt is avaliable in version 1.4, after clicking SAVE button wont print kitchen receipt, any help you can provide is welcome.

Best regards Julio


Hi,

As far as I'm aware none of that code has been changed that pertains to kitchen printers. Was it working on a previous build of TavernerPos?

Matt
Reply | Reply with quote | Quote

Add comment


Security code
Refresh