fix : userid fixed for payout and cancel
This commit is contained in:
parent
2cb45a6857
commit
ab680256b7
@ -22,7 +22,7 @@ export class SidebarComponent {
|
||||
|
||||
showPayout: boolean = false;
|
||||
payoutTicketNo: string = '';
|
||||
|
||||
usrid: string | null = null;
|
||||
showDeposit: boolean = false;
|
||||
depositOperatorId = '';
|
||||
depositShroffId = '';
|
||||
@ -119,12 +119,16 @@ async printTicketCancel() {
|
||||
}
|
||||
|
||||
console.log('[✅ MATCH] Ticket No matches barcode. Proceeding to cancel...');
|
||||
this.btid = localStorage.getItem('btid');
|
||||
this.usrid = localStorage.getItem('employeeId');
|
||||
const userid = this.usrid ? this.usrid.slice(-3) : '';
|
||||
console.log("empl id", this.usrid)
|
||||
|
||||
try {
|
||||
const cancelReq = {
|
||||
ticketNo: lastTicket.barcodeId,
|
||||
btId: lastTicket.btId || "0485",
|
||||
usrId: lastTicket.usrId || "066"
|
||||
btId: this.btid,
|
||||
usrId: userid
|
||||
};
|
||||
|
||||
console.log("📡 Sending cancel request:", cancelReq);
|
||||
@ -242,7 +246,10 @@ async printPayoutTicket() {
|
||||
}
|
||||
|
||||
const userName = localStorage.getItem('userName') || 'Unknown';
|
||||
|
||||
this.btid = localStorage.getItem('btid');
|
||||
this.usrid = localStorage.getItem('employeeId');
|
||||
const userid = this.usrid ? this.usrid.slice(-3) : '';
|
||||
console.log("empl id", this.usrid)
|
||||
// Prepare request payload
|
||||
const apiPayload = {
|
||||
ticketNo: ticketNo,
|
||||
@ -250,8 +257,8 @@ async printPayoutTicket() {
|
||||
memAcctNum: "",
|
||||
memAcctCardCode: "",
|
||||
moneyTyp: "C",
|
||||
btId: "0485", // replace with dynamic btId if needed
|
||||
usrId: "341" // replace with dynamic usrId if needed
|
||||
btId: this.btid, // replace with dynamic btId if needed
|
||||
usrId: userid // replace with dynamic usrId if needed
|
||||
};
|
||||
|
||||
console.log("📡 Sending payout API request:", apiPayload);
|
||||
@ -771,6 +778,4 @@ objectKeys = Object.keys;
|
||||
this.withdrawAmount = this.withdrawAmount.slice(0, -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user