Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/lib/ops.ts
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ export async function computeDefaults(
const r = await callNS(ctx, "ZUNIEFI_4003", PROG_LEGACY, {
BUDAT: budat, BLDAT: bldat, BLART: "KE",
LIFNR: user.pernr, LIFNR_TXT: user.pernrName,
BUPLA: "K100", GSBER: "K200", MWSKZ: "T0",
BUPLA: user.bupla ?? "K100", GSBER: user.gsber ?? "K200", MWSKZ: "T0",
AKONT: "21020103", ZTERM: "V123",
WRBTR: String(amountWon), WRBTR_SLASH: "", WMWST: "0",
BVTYP: "0001", ZFBDT: "", ZFBDT_SLASH: "",
Expand Down Expand Up @@ -529,7 +529,7 @@ export async function createTempDoc(
const commonFi = {
BUDAT: budat, BLDAT: bldat, BLART: "KE",
LIFNR: user.pernr, LIFNR_TXT: user.pernrName,
BUPLA: "K100", GSBER: "K200", MWSKZ: "T0",
BUPLA: user.bupla ?? "K100", GSBER: user.gsber ?? "K200", MWSKZ: "T0",
AKONT: "21020103", ZTERM: "V123",
WRBTR: String(amountWon), WRBTR_SLASH: "", WMWST: "0",
BVTYP: "0001", ZFBDT: zfbdt, ZFBDT_SLASH: "",
Expand Down Expand Up @@ -929,7 +929,7 @@ export async function createCorpCardVoucher(
CHARGETOTAL: card.AMOUNT, CHARGETOTAL_Slash: "",
WMWST_READ_ONLY: card.TAX,
BUDAT: p.budat, BLDAT: bldat, BLART: "KE",
BUPLA: "K100", GSBER: "K200",
BUPLA: user.bupla ?? "K100", GSBER: user.gsber ?? "K200",
WRBTR_SLASH: "", WMWST: card.TAX,
ZFBDT_SLASH: "", EMPTY: "",
SGTXT: p.sgtxt,
Expand Down
2 changes: 2 additions & 0 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export interface UserProfile {
kostlText: string; // "Device Engineering"
wfDept: string; // Department code
wfDeptText: string; // "Service Engineering"
gsber?: string; // Business Area, e.g. "K300" (SAP requires cost-center-consistent value)
bupla?: string; // Business Place, e.g. "K100"
}

export interface ReimbursementItem {
Expand Down