adding the transaction page
This commit is contained in:
parent
975f3bba54
commit
97bbd41492
7 changed files with 371 additions and 15 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue