added code
This commit is contained in:
parent
739b598231
commit
cad0dd1aad
1 changed files with 32 additions and 0 deletions
32
src/main/java/tech/iBeans/POSware/Lite/transaction.java
Normal file
32
src/main/java/tech/iBeans/POSware/Lite/transaction.java
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
package tech.iBeans.POSware.Lite;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author eleven
|
||||||
|
*/
|
||||||
|
public class transaction {
|
||||||
|
// The current transaction item
|
||||||
|
public static ArrayList<String> items = new ArrayList<String>();
|
||||||
|
public static int items_count = items.size();
|
||||||
|
|
||||||
|
public static boolean add(String SKU, int QUANTITY) {
|
||||||
|
/* Add an item to the shopping cart.
|
||||||
|
Parameters:
|
||||||
|
SKU (String): the SKU of the item
|
||||||
|
QUANTITY (int): the quantity
|
||||||
|
Returns: (boolean) the add state
|
||||||
|
*/
|
||||||
|
|
||||||
|
items.add(SKU);
|
||||||
|
|
||||||
|
return(true);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
};
|
Loading…
Add table
Add a link
Reference in a new issue