Sunday, April 24, 2016

Receipt Conversion

create or replace PROCEDURE XXCREATE_CASH(ERRBUT OUT VARCHAR2,RETCODE VARCHAR2)
AS
           -- Standard API parameters.
                 x_p_api_version        NUMBER;
                 x_p_init_msg_list      VARCHAR2(240) := FND_API.G_FALSE;
                 x_p_commit             VARCHAR2(240) := FND_API.G_FALSE;
                 x_p_validation_level   NUMBER   := FND_API.G_VALID_LEVEL_FULL;
--               X_p_usr_currency_code         VARCHAR2(240) DEFAULT NUL; --the translated currency code
                 x_p_currency_code             VARCHAR2(240) DEFAULT NULL;
--                 p_usr_exchange_rate_type    VARCHAR2(240) DEFAULT NULL;
--                 p_exchange_rate_type        VARCHAR2(240) DEFAULT NULL;
--                 p_exchange_rate             NUMBER   DEFAULT NULL;
--                 p_exchange_rate_date        DATE     DEFAULT NULL;
                 x_p_amount                    NUMBER;
--                 p_factor_discount_amount    NUMBER DEFAULT NULL;
                 x_p_receipt_number           VARCHAR2(100);
                 x_p_receipt_date              DATE     DEFAULT SYSDATE;
                 x_p_gl_date                   DATE     DEFAULT SYSDATE;
                 x_p_maturity_date             DATE     DEFAULT NULL;
                 x_p_postmark_date             DATE     DEFAULT NULL;
                 x_p_customer_id              NUMBER ;
                 x_p_customer_name             VARCHAR2(240);
                 x_p_customer_number          VARCHAR2(100);
                 x_p_customer_bank_account_id  NUMBER ;
                 x_p_customer_bank_account_num     VARCHAR2(240);
                 x_p_customer_bank_account_name    VARCHAR2(240)  DEFAULT NULL;
                 x_p_payment_trxn_extension_id    NUMBER DEFAULT NULL; --payment uptake changes bichatte
--                 p_location                   VARCHAR2(240) DEFAULT NULL;
                 x_p_customer_site_use_id     NUMBER;
                 x_p_customer_site_use VARCHAR2(240) DEFAULT NULL;
                 x_p_default_site_use          VARCHAR2(240) DEFAULT  'Y'; --bug4448307-4509459
--                 p_customer_receipt_reference   VARCHAR2(240)  DEFAULT NULL;
--                 p_override_remit_account_flag   VARCHAR2(240) DEFAULT NULL;
                 x_p_remittance_bank_acct_id    NUMBER ;
                 x_p_remittance_bank_acct_num   VARCHAR2(240) DEFAULT NULL;
                 x_p_remittance_bank_acct_name  VARCHAR2(240) DEFAULT NULL;
                 x_p_deposit_date               DATE     DEFAULT SYSDATE;
                 x_p_receipt_method_id          NUMBER ;
                 x_p_receipt_method_name        VARCHAR2(240) DEFAULT NULL;
                 x_p_doc_sequence_value         NUMBER   DEFAULT NULL;
                 x_p_ussgl_transaction_code     VARCHAR2(240) DEFAULT NULL;
                 x_p_anticipated_clearing_date  DATE     DEFAULT NULL;
                 x_p_called_from                VARCHAR2(240) DEFAULT NULL;
                x_p_attribute_rec           attribute_rec_type DEFAULT attribute_rec_const;
       -- ******* Global Flexfield parameters *******
                x_p_global_attribute_rec   global_attribute_rec_type DEFAULT global_attribute_rec_const;
                 x_p_comments              VARCHAR2(240);
      --   ***  Notes Receivable Additional Information  ***
                 x_p_issuer_name                   VARCHAR2(240)  DEFAULT NULL;
                 x_p_issue_date                    DATE   DEFAULT SYSDATE;
                 x_p_issuer_bank_branch_id         NUMBER  DEFAULT NULL;
                 x_p_org_id                        NUMBER ;
                 X_p_installment                   NUMBER  DEFAULT NULL;
      --   ** OUT NOCOPY variables
                 x_p_cr_id     NUMBER;
BEGIN
fnd_global.apps_initialize(1318,50559,222);
mo_global.init('AR');
AR_RECEIPT_API_PUB.CREATE_CASH
(
 p_api_version     => '1.0',
        p_init_msg_list => x_p_init_msg_list,
        p_commit => x_p_commit,
        p_validation_level => x_p_validation_level,
        p_currency_code => 'USD',
        p_amount => '900',             
        p_receipt_number => '1230',
        p_receipt_date => x_p_receipt_date,            
        p_gl_date =>x_p_gl_date,
        p_maturity_date =>x_p_maturity_date,
        p_postmark_date  =>x_p_postmark_date,
        p_customer_id => '1004',
        p_customer_name=> 'Hilman and Associates',
        p_customer_number=> '1230',
        p_customer_bank_account_id=> '10010' ,
        p_customer_bank_account_num => '1230',
        p_customer_bank_account_name=> x_p_customer_bank_account_name,
        p_payment_trxn_extension_id => x_p_payment_trxn_extension_id, 
        p_customer_site_use_id => '1017',
        p_customer_site_use => x_p_customer_site_use, 
        p_remittance_bank_account_id=>'10010'  ,
        p_remittance_bank_account_num => x_p_remittance_bank_acct_num  ,
        p_remittance_bank_account_name => x_p_remittance_bank_acct_name ,
        p_deposit_date  => x_p_deposit_date,
        p_receipt_method_id => '1001',
        p_receipt_method_name=> x_p_receipt_method_name,
        p_doc_sequence_value=> x_p_doc_sequence_value,
        p_ussgl_transaction_code=> x_p_ussgl_transaction_code,
        p_anticipated_clearing_date => x_p_anticipated_clearing_date ,
        p_called_from => x_p_called_from,
        p_attribute_rec=> x_p_attribute_rec,
        p_global_attribute_rec=> x_p_global_attribute_rec  ,
        p_comments => 'RITWIK TRANSACTION',
        p_issuer_name => x_p_issuer_name,
        p_issue_date  => x_p_issue_date,
        p_issuer_bank_branch_id  => x_p_issuer_bank_branch_id,
        p_org_id    => '204',
        p_installment => x_p_installment ,
        p_cr_id =>x_p_cr_id
);
COMMIT;
END;
/

No comments:

Post a Comment

How to improve blog performance

Improving the performance of a blog can involve a variety of strategies, including optimizing the website's technical infrastructure, im...