adding the transaction page

This commit is contained in:
csawatzky 2025-04-08 11:43:39 -06:00
parent 975f3bba54
commit 97bbd41492
7 changed files with 371 additions and 15 deletions

View file

@ -203,6 +203,7 @@ export default function GrainTransaction(props: Props) {
//create a transaction to enter into the table
const createTransaction = (finalVal: number) => {
console.log("create transaction")
let dest = selectedDestination;
let source = selectedSource;
let bpt = 1;
@ -248,13 +249,16 @@ export default function GrainTransaction(props: Props) {
grainTransaction.subtype = obj.subtype();
}
}
console.log(newTransaction)
transactionAPI.addTransaction(newTransaction, imageIDs).then(resp => {
console.log(resp)
newTransaction.key = resp.data.key;
closeDialogs(true, newTransaction);
});
};
const updateInventory = () => {
console.log("update inventory")
//this is the amount to add to the destination
let destinationAdd = Math.abs(
isNaN(parseFloat(grainChangeVal)) ? 1 : parseFloat(grainChangeVal)