31: l_operation := p_x_header_payment_rec.operation;
32:
33: IF (p_x_Header_Payment_rec.payment_number = FND_API.G_MISS_NUM
34: OR p_x_Header_Payment_rec.payment_number IS NULL)
35: AND l_operation = OE_GLOBALS.G_OPR_CREATE
36: THEN
37: p_x_Header_Payment_rec.payment_number
38: := Get_Payment_Number(p_x_Header_Payment_rec.header_id);
39: END IF;
49: ,x_rowtype_rec => l_old_header_payment_rec);
50:
51:
52: -- For some fields, get hardcoded defaults based on the operation
53: IF l_operation = OE_GLOBALS.G_OPR_CREATE THEN
54:
55: g_header_payment_rec.payment_level_code := 'ORDER';
56:
57: END IF;
62: oe_debug_pub.add('OEXDHPMB -- trxn_extension_id is: '||p_x_header_payment_rec.trxn_extension_id);
63: oe_debug_pub.add('g_header_payment_rec.credit_card_number...'||g_header_payment_rec.credit_card_number);
64: oe_debug_pub.add('g_header_payment_rec.credit_card_code...'||g_header_payment_rec.credit_card_code);
65: -- bug 5001819
66: IF OE_GLOBALS.G_UI_FLAG THEN
67: oe_debug_pub.add('G ui flag True');
68:
69: ELSE
70: oe_debug_pub.add('Gui flag false');
75: --other products were passing the trxn extension id alone and the
76: --other credit card attributes were set as G_MISS values. When
77: --the call comes from OM, defaulting would need to happen.
78: IF p_x_header_payment_rec.trxn_extension_id IS NOT NULL AND
79: NOT OE_GLOBALS.Equal(p_x_header_payment_rec.trxn_extension_id,FND_API.G_MISS_NUM)
80: AND NOT OE_GLOBALS.G_UI_FLAG AND p_x_header_payment_rec.operation = OE_GLOBALS.G_OPR_CREATE
81: THEN
82: IF OE_GLOBALS.Equal(g_header_payment_rec.credit_Card_number,FND_API.G_MISS_CHAR) THEN --bug 5020737
83: g_header_payment_rec.credit_card_number := null;
76: --other credit card attributes were set as G_MISS values. When
77: --the call comes from OM, defaulting would need to happen.
78: IF p_x_header_payment_rec.trxn_extension_id IS NOT NULL AND
79: NOT OE_GLOBALS.Equal(p_x_header_payment_rec.trxn_extension_id,FND_API.G_MISS_NUM)
80: AND NOT OE_GLOBALS.G_UI_FLAG AND p_x_header_payment_rec.operation = OE_GLOBALS.G_OPR_CREATE
81: THEN
82: IF OE_GLOBALS.Equal(g_header_payment_rec.credit_Card_number,FND_API.G_MISS_CHAR) THEN --bug 5020737
83: g_header_payment_rec.credit_card_number := null;
84: END IF;
78: IF p_x_header_payment_rec.trxn_extension_id IS NOT NULL AND
79: NOT OE_GLOBALS.Equal(p_x_header_payment_rec.trxn_extension_id,FND_API.G_MISS_NUM)
80: AND NOT OE_GLOBALS.G_UI_FLAG AND p_x_header_payment_rec.operation = OE_GLOBALS.G_OPR_CREATE
81: THEN
82: IF OE_GLOBALS.Equal(g_header_payment_rec.credit_Card_number,FND_API.G_MISS_CHAR) THEN --bug 5020737
83: g_header_payment_rec.credit_card_number := null;
84: END IF;
85:
86: IF OE_GLOBALS.Equal(g_header_payment_rec.credit_card_code,FND_API.G_MISS_CHAR) THEN --bug 5020737
82: IF OE_GLOBALS.Equal(g_header_payment_rec.credit_Card_number,FND_API.G_MISS_CHAR) THEN --bug 5020737
83: g_header_payment_rec.credit_card_number := null;
84: END IF;
85:
86: IF OE_GLOBALS.Equal(g_header_payment_rec.credit_card_code,FND_API.G_MISS_CHAR) THEN --bug 5020737
87: g_header_payment_rec.credit_card_code := null;
88: END IF;
89:
90: IF OE_GLOBALS.Equal(g_header_payment_rec.credit_card_holder_name,FND_API.G_MISS_CHAR) THEN --bug 5020737
86: IF OE_GLOBALS.Equal(g_header_payment_rec.credit_card_code,FND_API.G_MISS_CHAR) THEN --bug 5020737
87: g_header_payment_rec.credit_card_code := null;
88: END IF;
89:
90: IF OE_GLOBALS.Equal(g_header_payment_rec.credit_card_holder_name,FND_API.G_MISS_CHAR) THEN --bug 5020737
91: g_header_payment_rec.credit_card_holder_name := null;
92: END IF;
93:
94: IF OE_GLOBALS.Equal(g_header_payment_rec.credit_card_expiration_date,FND_API.G_MISS_DATE) THEN --bug 5020737
90: IF OE_GLOBALS.Equal(g_header_payment_rec.credit_card_holder_name,FND_API.G_MISS_CHAR) THEN --bug 5020737
91: g_header_payment_rec.credit_card_holder_name := null;
92: END IF;
93:
94: IF OE_GLOBALS.Equal(g_header_payment_rec.credit_card_expiration_date,FND_API.G_MISS_DATE) THEN --bug 5020737
95: g_header_payment_rec.credit_card_expiration_date := null;
96: END IF;
97:
98: END IF;
122: (p_x_header_Payment_rec);
123:
124: /* code change for defer_payment_processing_flag */
125:
126: l_org_id := OE_GLOBALS.G_ORG_ID;
127: l_payment_type_code := p_x_header_Payment_rec.payment_type_code;
128: l_old_payment_type_code := p_old_header_Payment_rec.payment_type_code;
129:
130: if l_org_id is null then
127: l_payment_type_code := p_x_header_Payment_rec.payment_type_code;
128: l_old_payment_type_code := p_old_header_Payment_rec.payment_type_code;
129:
130: if l_org_id is null then
131: OE_GLOBALS.Set_Context;
132: l_org_id := OE_GLOBALS.G_ORG_ID;
133: end if;
134:
135: Begin
128: l_old_payment_type_code := p_old_header_Payment_rec.payment_type_code;
129:
130: if l_org_id is null then
131: OE_GLOBALS.Set_Context;
132: l_org_id := OE_GLOBALS.G_ORG_ID;
133: end if;
134:
135: Begin
136: --bug3504713 commenting the following condition and adding a new condition
134:
135: Begin
136: --bug3504713 commenting the following condition and adding a new condition
137: -- if p_x_header_Payment_rec.defer_payment_processing_flag is null
138: if NOT OE_GLOBALS.EQUAL(l_payment_type_code,l_old_payment_type_code)
139: and l_payment_type_code is not null
140: and (
141: (OE_GLOBALS.EQUAL(p_x_header_Payment_rec.defer_payment_processing_flag,
142: p_old_header_Payment_rec.defer_payment_processing_flag)
137: -- if p_x_header_Payment_rec.defer_payment_processing_flag is null
138: if NOT OE_GLOBALS.EQUAL(l_payment_type_code,l_old_payment_type_code)
139: and l_payment_type_code is not null
140: and (
141: (OE_GLOBALS.EQUAL(p_x_header_Payment_rec.defer_payment_processing_flag,
142: p_old_header_Payment_rec.defer_payment_processing_flag)
143: and p_x_header_Payment_rec.operation = OE_GLOBALS.G_OPR_UPDATE)
144: or
145: (nvl(p_x_header_Payment_rec.defer_payment_processing_flag,
139: and l_payment_type_code is not null
140: and (
141: (OE_GLOBALS.EQUAL(p_x_header_Payment_rec.defer_payment_processing_flag,
142: p_old_header_Payment_rec.defer_payment_processing_flag)
143: and p_x_header_Payment_rec.operation = OE_GLOBALS.G_OPR_UPDATE)
144: or
145: (nvl(p_x_header_Payment_rec.defer_payment_processing_flag,
146: FND_API.G_MISS_CHAR) = FND_API.G_MISS_CHAR
147: and p_x_header_Payment_rec.operation = OE_GLOBALS.G_OPR_CREATE)
143: and p_x_header_Payment_rec.operation = OE_GLOBALS.G_OPR_UPDATE)
144: or
145: (nvl(p_x_header_Payment_rec.defer_payment_processing_flag,
146: FND_API.G_MISS_CHAR) = FND_API.G_MISS_CHAR
147: and p_x_header_Payment_rec.operation = OE_GLOBALS.G_OPR_CREATE)
148: or
149: (nvl(p_old_header_Payment_rec.defer_payment_processing_flag,
150: FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR
151: and p_x_header_Payment_rec.operation = OE_GLOBALS.G_OPR_CREATE)
147: and p_x_header_Payment_rec.operation = OE_GLOBALS.G_OPR_CREATE)
148: or
149: (nvl(p_old_header_Payment_rec.defer_payment_processing_flag,
150: FND_API.G_MISS_CHAR) <> FND_API.G_MISS_CHAR
151: and p_x_header_Payment_rec.operation = OE_GLOBALS.G_OPR_CREATE)
152: )
153: then
154:
155: select defer_payment_processing_flag into l_defer