EBS技术开发之返利开发

返利开发涉及EBS系统中对应收发票的处理,包括更改和新增操作。主要涵盖对发票行和分配行的调整,以实现公司间应收款项的按比例返还给客户。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

返利是指公司间应收款项按一定比率的返还给客户。返利开发实质就是实现对应收发票的更改和新增(暂时我的理解)

一.对发票行更改

PACKAGE AP_INVOICE_LINES_ALL_PRIVATE IS
  PROCEDURE INSERT_ROW (X_LINE_NUM OUT NUMBER,P_FLAG VARCHAR2,P_AMOUNT NUMBER);
  PROCEDURE UPDATE_ROW (P_LINE_NUM IN NUMBER,P_INVOICE_ID IN NUMBER,P_ORG_ID IN NUMBER);
END;
PACKAGE BODY AP_INVOICE_LINES_ALL_PRIVATE IS
  PROCEDURE INSERT_ROW (X_LINE_NUM OUT NUMBER,P_FLAG VARCHAR2,P_AMOUNT NUMBER)IS
  v_row_id VARCHAR2(1000);
  v_line_number number;
  g_user_id         CONSTANT NUMBER := fnd_global.user_id;
  g_login_id        CONSTANT NUMBER := fnd_global.conc_login_id;
  g_request_id      CONSTANT NUMBER := fnd_global.conc_request_id;
  g_prog_appl_id    CONSTANT NUMBER := fnd_global.prog_appl_id;
  g_conc_program_id CONSTANT NUMBER := fnd_global.conc_program_id;
  x_ccid number;
  V_AMOUNT NUMBER;
  BEGIN
  select max(NVL(line_number,0))
  into v_line_number
  from AP_INVOICE_LINES_ALL 
  where invoice_id = :parameter.G_INVOICE_ID;
  X_LINE_NUM := v_line_number + 1;
  cux_cuxaprebate_utl.create_account(p_org_id =>:parameter.g_org_id,
                           p_ccid   =>:parameter.G_CCID,
                           x_ccid   =>x_ccid);
  IF P_FLAG = 'CANCEL' THEN
  	V_AMOUNT := P_AMOUNT;
  ELSIF P_FLAG = 'APPLY' THEN
  	V_AMOUNT := - P_AMOUNT;	
  END IF;
  /*mo_global.init('AP');
  mo_global.set_policy_context(p_access_mode => 'S',
                                p_org_id      => :parameter.g_org_id);--mo_global.get_current_org_id*/
  ap_ail_table_handler_pkg.insert_row(p_rowid                        => v_row_id,
                                      p_invoice_id                   => :parameter.G_INVOICE_ID,
                                      p_line_number                  => X_LINE_NUM,
                                      p_line_type_lookup_code        => 'MISCELLANEOUS',--杂项
                                      p_line_group_number            => NULL,
                                      p_requester_id                 => NULL,
                                      p_description                  => NULL,
                                      p_line_source                  => NULL,
                                      p_org_id                       => NULL,
                                      p_inventory_item_id            => NULL,
                                      p_item_description             => NULL,
                                      p_serial_number                => NULL,
                                      p_manufacturer                 => NULL,
                                      p_model_number                 => NULL,
                                      p_warranty_number              => NULL,
                                      p_generate_dists               => NULL,
                                      p_match_type                   => NULL,
                                      p_distribution_set_id          => NULL,
                                      p_account_segment              => NULL,
                                      p_balancing_segment            => NULL,
                                      p_cost_center_segment          => NULL,
                                      p_overlay_dist_code_concat     => NULL,
                                      p_default_dist_ccid            => x_ccid,--ccid
                                      p_prorate_across_all_items     => NULL,
                                      p_accounting_date              => :parameter.G_GL_DATE,--gl_date
                                      p_period_name                  => NULL,
                                      p_deferred_acctg_flag          => NULL,
                                      p_def_acctg_start_date         => NULL,
                                      p_def_acctg_end_date           => NULL,
                                      p_def_acctg_number_of_periods  => NULL,
                                      p_def_acctg_period_type        => NULL,
                                      p_set_of_books_id              => :parameter.G_SET_OF_BOOKS_ID,--
                                      p_amount                       => V_AMOUNT,--金额
                                      p_base_amount                  => NULL,
                                      p_rounding_amt                 => NULL,
                                      p_quantity_invoiced            => NULL,
                                      p_unit_meas_lookup_code        => NULL,
                                      p_unit_price                   => NULL,
                                      p_wfapproval_status            => 'NOT REQUIRED',--
                                      p_discarded_flag               => NULL,
                                      p_original_amount              => NULL,
                                      p_original_base_amount         => NULL,
                                      p_original_rounding_amt        => NULL,
                                      p_cancelled_flag               => NULL,
                                      p_income_tax_region            => NULL,
                                      p_type_1099                    => NULL,
                                      p_stat_amount                  => NULL,
                                      p_prepay_invoice_id            => NULL,
                                      p_prepay_line_number           => NULL,
                                      p_invoice_includes_prepay_flag => NULL,
                                      p_corrected_inv_id             => NULL,
                                      p_corrected_line_number        => NULL,
                                      p_po_header_id                 => NULL,
                                      p_po_line_id   
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值