Add function
check if the receipt was empty
This commit is contained in:
parent
d6548c1c8e
commit
4cf91267c3
1 changed files with 10 additions and 3 deletions
|
@ -4,7 +4,6 @@
|
|||
*/
|
||||
package tech.iBeans.POSware.Lite;
|
||||
import java.util.*;
|
||||
import tech.iBeans.POSware.Lite.data_test.*;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -13,6 +12,7 @@ import tech.iBeans.POSware.Lite.data_test.*;
|
|||
public class receipt {
|
||||
public static String content = "";
|
||||
private static Dictionary<String, String> data = new Hashtable<>();
|
||||
public static Boolean clear = true;
|
||||
|
||||
public static void init() {
|
||||
content = "";
|
||||
|
@ -57,8 +57,15 @@ public class receipt {
|
|||
ready();
|
||||
};
|
||||
if (data.get("cart") != null) {
|
||||
content = content.concat(data.get("cart").toString());
|
||||
ready();
|
||||
if (!data.get("cart").isBlank()) {
|
||||
clear = false;
|
||||
content = content.concat(data.get("cart").toString());
|
||||
ready();
|
||||
} else {
|
||||
clear = true;
|
||||
};
|
||||
} else {
|
||||
clear = true;
|
||||
};
|
||||
if (data.get("payment") != null) {
|
||||
content = content.concat(data.get("payment").toString());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue