src-db/database/model/functions/C_TAXPAYMENT_POST.xml
changeset 1605 8a0fe0193bef
parent 1349 ffd9daaff911
child 1628 3bc8670b937f
equal deleted inserted replaced
1604:a1c518e6ed93 1605:8a0fe0193bef
     1 <?xml version="1.0"?>
     1 <?xml version="1.0"?>
     2   <database name="FUNCTION C_TAXPAYMENT_POST">
     2   <database name="FUNCTION C_TAXPAYMENT_POST">
     3     <function name="C_TAXPAYMENT_POST" type="NULL">
     3     <function name="C_TAXPAYMENT_POST" type="NULL">
     4       <parameter name="p_pinstance_id" type="NUMERIC" mode="in">
     4       <parameter name="p_pinstance_id" type="VARCHAR" mode="in">
     5         <default/>
     5         <default/>
     6       </parameter>
     6       </parameter>
     7       <body><![CDATA[/*************************************************************************
     7       <body><![CDATA[/*************************************************************************
     8 * The contents of this file are subject to the Openbravo  Public  License
     8 * The contents of this file are subject to the Openbravo  Public  License
     9 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
     9 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
    20 * All Rights Reserved.
    20 * All Rights Reserved.
    21 * Contributor(s):  ______________________________________.
    21 * Contributor(s):  ______________________________________.
    22 ************************************************************************/
    22 ************************************************************************/
    23 v_resultstr VARCHAR2(2000) := '';
    23 v_resultstr VARCHAR2(2000) := '';
    24 v_message VARCHAR2(200) := '';
    24 v_message VARCHAR2(200) := '';
    25 v_record_id NUMBER;
    25 v_record_ID VARCHAR2(32);
    26 v_result NUMBER:= 1;
    26 v_result NUMBER:= 1;
    27 -- Success
    27 -- Success
    28 v_total NUMBER;
    28 v_total NUMBER;
    29 v_c_settlement_cancel_id NUMBER;
    29 v_c_settlement_cancel_ID VARCHAR2(32);
    30 -- Parameter
    30 -- Parameter
    31 TYPE record IS REF CURSOR;
    31 TYPE record IS REF CURSOR;
    32 cur_parameter record;
    32 cur_parameter record;
    33 cur_registertype record;
    33 cur_registertype record;
    34 cur_line record;
    34 cur_line record;
    35 -- Record Info
    35 -- Record Info
    36 v_client_id NUMBER;
    36 v_client_ID VARCHAR2(32);
    37 v_org_id NUMBER;
    37 v_org_ID VARCHAR2(32);
    38 v_updatedby c_taxpayment.updatedby%TYPE;
    38 v_updatedby c_taxpayment.updatedby%TYPE;
    39 v_createdby c_taxpayment.createdby%TYPE;
    39 v_createdby c_taxpayment.createdby%TYPE;
    40 v_processed c_taxpayment.processed%TYPE;
    40 v_processed c_taxpayment.processed%TYPE;
    41 
    41 
    42 v_taxtotalamt NUMBER;
    42 v_taxtotalamt NUMBER;
    51 v_taxamtfromreglines NUMBER;
    51 v_taxamtfromreglines NUMBER;
    52 
    52 
    53 v_taxregistertotal NUMBER;
    53 v_taxregistertotal NUMBER;
    54 
    54 
    55 v_date DATE;
    55 v_date DATE;
    56 v_settlementid NUMBER;
    56 v_settlementid varchar2(32);
    57 v_settlementdoctype_id NUMBER;
    57 v_settlementdoctype_ID VARCHAR2(32);
    58 v_sdocumentno NUMBER;
    58 v_sdocumentno NUMBER;
    59 v_debtpaymentid NUMBER;
    59 v_debtpaymentid varchar2(32);
    60 v_debtpaymentbalancingid NUMBER;
    60 v_debtpaymentbalancingid varchar2(32);
    61 v_paymentrule VARCHAR2(30);
    61 v_paymentrule VARCHAR2(30);
    62 v_bpartner_id NUMBER;
    62 v_bpartner_ID VARCHAR2(32);
    63 
    63 
    64 
    64 
    65 v_gl_journalbatchid NUMBER;
    65 v_gl_journalbatchid varchar2(32);
    66 v_gljbdocumentno NUMBER;
    66 v_gljbdocumentno NUMBER;
    67 v_gl_journaldoctype_id NUMBER;
    67 v_gl_journaldoctype_ID VARCHAR2(32);
    68 v_gl_journalid NUMBER;
    68 v_gl_journalid varchar2(32);
    69 v_gljdocumentno NUMBER;
    69 v_gljdocumentno NUMBER;
    70 v_gl_journallineid NUMBER;
    70 v_gl_journallineid varchar2(32);
    71 v_line NUMBER;
    71 v_line NUMBER;
    72 v_validcombination_id NUMBER;
    72 v_validcombination_ID VARCHAR2(32);
    73 
    73 
    74 v_glitem_acct NUMBER;
    74 v_glitem_acct NUMBER;
    75 v_glitem_id NUMBER;
    75 v_glitem_ID VARCHAR2(32);
    76 
    76 
    77 v_debit NUMBER;
    77 v_debit NUMBER;
    78 v_credit NUMBER;
    78 v_credit NUMBER;
    79  v_totaldebit NUMBER;
    79  v_totaldebit NUMBER;
    80 v_totalcredit NUMBER;
    80 v_totalcredit NUMBER;
    81 
    81 
    82 
    82 
    83 v_acctschema_id NUMBER;
    83 v_acctschema_ID VARCHAR2(32);
    84 v_currency_id NUMBER;
    84 v_currency_ID VARCHAR2(32);
    85 v_currencyratetype VARCHAR2(30);
    85 v_currencyratetype VARCHAR2(30);
    86 v_gl_category_id NUMBER;
    86 v_gl_category_ID VARCHAR2(32);
    87 v_period_id NUMBER;
    87 v_period_ID VARCHAR2(32);
    88 
    88 
    89 v_name NVARCHAR2(255);
    89 v_name NVARCHAR2(255);
    90 v_TRTcountY  NUMBER;
    90 v_TRTcountY  NUMBER;
    91 v_TRTcountN  NUMBER;
    91 v_TRTcountN  NUMBER;
    92 v_DBA_ErrorLog_ID NUMBER;
    92 v_DBA_ErrorLog_ID VARCHAR2(32);
    93 
    93 
    94 
    94 
    95 
    95 
    96 
    96 
    97 
    97