fmb_draft_voucher: 15 programs convert in part
Shortest first. Left, the PL/SQL as the form holds it. Right, the clauses in the vocabulary’s spelling and, under them, each refused statement with the converter’s reason. 8 of them are program units, headed on unit: a unit’s refusals belong to the unit and are finished there once, and a caller that inlined one links to it rather than asking for the same work again.
Declare
V_Alert Number;
Begin
If Nvl(:Dvh_Confirmed, 'P') = ('Y') Or Nvl(:Dvh_Status, 'N') = ('C') Then
Show_Message('Msg_Alert', 'Document is already Confirmed/Canceled!');
Raise Form_Trigger_Failure;
End If;
V_Alert := Show_Alert('Conf_Cancl');
If V_Alert = Alert_Button1 Then
Update T_Draft_Voucher_Header Set Dvh_Status = 'C', Dvh_Edt_Dt = Sysdate, Dvh_Edt_User = :Global.User
Where Dvh_Id = :Dvh_Id;
Standard.Commit;
Show_Message('Msg_Alert', 'Document canceled sucessfully!');
Clear_Form(No_Commit);
Init_Form;
End If;
End;
on press of PB_CANCEL: deny when (DVH_CONFIRMED = 'Y') or (DVH_STATUS = 'C') else "Document is already Confirmed/Canceled!" show alert CONF_CANCL call WRITE_T_DRAFT_VOUCHER_HEADER_A8556028(GLOBAL.USER, DVH_ID) when ANSWER.BUTTON = '1' warn "Document canceled sucessfully!" when ANSWER.BUTTON = '1' clear form when ANSWER.BUTTON = '1' # 1 statement did not convert.# line 13 # Standard.Commit; # reason: G13: mid-trigger DML and the transaction boundary are refused, not converted
5 clauses converted, 1 statement refused
FUNCTION fn_find_prev_period (p_period IN VARCHAR2)
RETURN VARCHAR2 IS
v_quarter NUMBER;
v_month NUMBER;
v_prev_period VARCHAR2 (4) := '####';
BEGIN
v_quarter := SUBSTR (p_period, 2, 1);
v_month := SUBSTR (p_period, 4, 1);
IF v_quarter = 1 THEN
IF v_month BETWEEN 2 AND 3 THEN
v_prev_period :=
'q' || TO_CHAR (v_quarter) || 'm'
|| TO_CHAR (v_month - 1);
END IF;
ELSIF v_quarter BETWEEN 2 AND 4 THEN
IF v_month = 1 THEN
v_prev_period := 'q' || TO_CHAR (v_quarter - 1) || 'm3';
ELSIF v_month BETWEEN 2 AND 3 THEN
v_prev_period :=
'q' || TO_CHAR (v_quarter) || 'm'
|| TO_CHAR (v_month - 1);
ELSE
show_message ('Draft_Alert', 'wrong period entry');
END IF;
ELSE
show_message ('Draft_Alert', 'wrong period entry');
END IF;
RETURN (v_prev_period);
END;on unit FN_FIND_PREV_PERIOD(P_PERIOD): warn "wrong period entry" when ((not (substr(ARG.P_PERIOD, 2, 1) = 1) and ((substr(ARG.P_PERIOD, 2, 1) >= 2) and (substr(ARG.P_PERIOD, 2, 1) <= 4))) and not (substr(ARG.P_PERIOD, 4, 1) = 1)) and not ((substr(ARG.P_PERIOD, 4, 1) >= 2) and (substr(ARG.P_PERIOD, 4, 1) <= 3)) warn "wrong period entry" when not (substr(ARG.P_PERIOD, 2, 1) = 1) and not ((substr(ARG.P_PERIOD, 2, 1) >= 2) and (substr(ARG.P_PERIOD, 2, 1) <= 4)) # 1 statement did not convert.# line 30 # RETURN (v_prev_period); # reason: this RETURN gives the local V_PREV_PERIOD, which 3 statements of one branch above it write, in no single chain of arms, so what it holds here depends on which path ran. What the function returns is therefore not stated
2 clauses converted, 1 statement refused
Declare
v_Txn_Type varchar2(10);
Cursor Curtxn is Select Txn_Type from M_stock_txn where Txn_Code =:Ref_Txn;
Begin
Clear_Unchecked_Record;
/* Go_Block('T_Draft_Voucher_Detail');
Clear_Block(No_Commit);*/
Go_Block('T_DRAFT_VOUCHER_REF_DOC');
First_Record;
Loop
If Nvl(:Chk_Flag,'N') = 'Y' Then
If Nvl(:Txn_Type, 'X') ='PURCHASE' Then
Load_Gr_Exp;
ElsIf :Ref_Txn Is Null Then
Load_Petty_Cash;
Else
Load_Draft_Voucher;
Load_EmpExp_And_PaySlip;
Load_Payroll; --Payroll
End If;
End If;
Go_Block('T_DRAFT_VOUCHER_REF_DOC');
If :System.Last_Record='TRUE' Then
Exit;
End If;
Next_Record;
End Loop;
Go_Block('T_Draft_Voucher_Detail');
First_Record;
End;
on press of LOAD_BTN: call CLEAR_UNCHECKED_RECORD() go to T_DRAFT_VOUCHER_REF_DOC go to T_DRAFT_VOUCHER_DETAIL # 1 statement did not convert.# line 13 # Loop # If Nvl(:Chk_Flag,'N') = 'Y' Then # If Nvl(:Txn_Type, 'X') ='PURCHASE' Then # Load_Gr_Exp; # ElsIf :Ref_Txn Is Null Then # Load_Petty_Cash; # Else # Load_Draft_Voucher; # Load_EmpExp_And_PaySlip; # Load_Payroll; # End If; # End If; # # Go_Block('T_DRAFT_VOUCHER_REF_DOC'); # If :System.Last_Record='TRUE' Then # Exit; # End If; # # Next_Record; # End Loop; # reason: LOAD_GR_EXP is a program unit of this form used as a value, and a unit's body is inlined at a call statement rather than read for a return, so no FormConnect entry is written for it and what this expression holds is not stated
3 clauses converted, 1 statement refused
Declare
v_Flag Boolean;
v_Count Number;
Begin
proc_valid_finaltxn_usergroup(:Global.company,:DVH_Txn_Code,:Global.User,v_Flag);
If v_Flag =False Then
Show_Message('Alert1', 'Transaction not enabled for this User');
Raise Form_Trigger_Failure;
End If;
If :DVH_Divn_Code Is Not Null Then
Select Divn_Name INTO :Divn_Name From M_Division Where Divn_Comp_Code =:Global.Company
and Divn_Code =:DVH_Divn_Code;
End If;
If :DVH_Txn_Code Is Not Null Then
Select Final_Txn_Name INTO :Txn_Desc From M_Final_Txn Where Final_Txn_Code =:DVH_Txn_Code;
End If;
If :DvH_Th_id is Not Null Then
Select Count(*) INTO v_Count From T_Cur_Trans_Header Where Th_Id =:Dvh_Th_Id;
If Nvl(v_Count,0) > 0 Then
Select Th_Doc_No INTO :Th_Doc_No From T_Cur_Trans_Header Where Th_Id =:Dvh_Th_Id;
Else
Select Count(*) INTO v_Count From T_Prv_Trans_Header Where Th_Id =:Dvh_Th_Id;
If Nvl(v_Count,0) > 0 Then
Select Th_Doc_No INTO :Th_Doc_No From T_Prv_Trans_Header Where Th_Id =:Dvh_Th_Id;
End If;
End If;
End If;
Select Count(*)
Into :DvH_Prn_Count
From T_Divn_Txn_Print_Log
Where Dtplog_Comp_Code =:DvH_Comp_Code
And Dtplog_Divn_Code =:DvH_Divn_Code
And Dtplog_Ayr_Code =:DvH_Ayr_Code
And Dtplog_Txn_Code =:DvH_Txn_Code
And :DvH_Doc_No Between Dtplog_No_From And Dtplog_No_To;
:frm_rights_prn := fn_get_user_rights (:GLOBAL.company, :parameter.menu_code, :GLOBAL.USER, 'Print');
If Nvl(:frm_rights_prn,0) =0 Then
Set_Item_Property('Print_Btn',Enabled,Property_False);
Else
Set_Item_Property('Print_Btn',Enabled,Property_True);
End If;
:Frm_Rights_Can := Fn_Get_User_Rights(:Global.Company, :Parameter.Menu_Code, :Global.User, 'Cancel');
If :Frm_Rights_Can > 0 Then
Set_Item_Property('PB_CANCEL', Visible, Property_True);
Else
Set_Item_Property('PB_CANCEL', Visible, Property_False);
End If;
End;
on load of T_DRAFT_VOUCHER_HEADER: from DIVISION(DVH_DIVN_CODE) when is_filled(DVH_DIVN_CODE) # load-fmb-draft-voucher-t-draft-voucher-header-post-query-load-0 from FINAL_TXN(DVH_TXN_CODE) when is_filled(DVH_TXN_CODE) # load-fmb-draft-voucher-t-draft-voucher-header-post-query-load-1 from CUR_TRANS_HEADER_COUNT(DVH_TH_ID) when is_filled(DVH_TH_ID) # load-fmb-draft-voucher-t-draft-voucher-header-post-query-load-2 from CUR_TRANS_HEADER(DVH_TH_ID) when is_filled(DVH_TH_ID) and (nvl(CUR_TRANS_HEADER_COUNT.COUNT, 0) > 0) # load-fmb-draft-voucher-t-draft-voucher-header-post-query-load-3 from PRV_TRANS_HEADER_COUNT(DVH_TH_ID) when is_filled(DVH_TH_ID) and not (nvl(CUR_TRANS_HEADER_COUNT.COUNT, 0) > 0) # load-fmb-draft-voucher-t-draft-voucher-header-post-query-load-4 from PRV_TRANS_HEADER(DVH_TH_ID) when (is_filled(DVH_TH_ID) and not (nvl(CUR_TRANS_HEADER_COUNT.COUNT, 0) > 0)) and (nvl(PRV_TRANS_HEADER_COUNT.COUNT, 0) > 0) # load-fmb-draft-voucher-t-draft-voucher-header-post-query-load-5 from DIVN_TXN_PRINT_LOG(DVH_AYR_CODE, DVH_COMP_CODE, DVH_DIVN_CODE, DVH_DOC_NO, DVH_TXN_CODE) # load-fmb-draft-voucher-t-draft-voucher-header-post-query-load-6 call PROC_VALID_FINALTXN_USERGROUP(GLOBAL.COMPANY, DVH_TXN_CODE, GLOBAL.USER, null) set DIVN_NAME to DIVISION.DIVN_NAME when is_filled(DVH_DIVN_CODE) set TXN_DESC to FINAL_TXN.FINAL_TXN_NAME when is_filled(DVH_TXN_CODE) set TH_DOC_NO to CUR_TRANS_HEADER.TH_DOC_NO when is_filled(DVH_TH_ID) and (nvl(CUR_TRANS_HEADER_COUNT.COUNT, 0) > 0) set TH_DOC_NO to PRV_TRANS_HEADER.TH_DOC_NO when (is_filled(DVH_TH_ID) and not (nvl(CUR_TRANS_HEADER_COUNT.COUNT, 0) > 0)) and (nvl(PRV_TRANS_HEADER_COUNT.COUNT, 0) > 0) set DVH_PRN_COUNT to DIVN_TXN_PRINT_LOG.COUNT set FRM_RIGHTS_PRN to FN_GET_USER_RIGHTS(GLOBAL.COMPANY, PARAMETER.MENU_CODE, GLOBAL.USER, 'Print') state disable PRINT_BTN when nvl(FRM_RIGHTS_PRN, 0) = 0 state enable PRINT_BTN when not (nvl(FRM_RIGHTS_PRN, 0) = 0) set FRM_RIGHTS_CAN to FN_GET_USER_RIGHTS(GLOBAL.COMPANY, PARAMETER.MENU_CODE, GLOBAL.USER, 'Cancel') state show PB_CANCEL when FRM_RIGHTS_CAN > 0 state hide PB_CANCEL when not (FRM_RIGHTS_CAN > 0) # 1 statement did not convert.# line 6 # If v_Flag =False Then # Show_Message('Alert1', 'Transaction not enabled for this User'); # Raise Form_Trigger_Failure; # End If; # reason: the guard reads FALSE, which is one of Forms' own constants and not a value: CRL has no expression for what a property or an alert button is called
12 clauses converted, 1 statement refused
Procedure Proc_Validate_Dt1(Dt In Date) Is
V_Cur_Ayr_Code Varchar2(10);
-- V_Prv_Ayr_Code Varchar2(10);
V_Next_Ayr_Code Varchar2(10);
V_Ayr_Code Varchar2(10);
V_Dt Date;
V_Prev_Dt Date;
V_Cur_Dt Date;
Begin
Select Sysdate Into V_Dt From Dual;
:Frm_Prv_Days :=Fn_Get_Final_Txn_Param(:Dvh_Txn_Code, :Global.Company, 'FINAL_DRAFT_PRV_DAYS');
:Frm_Fut_Days :=Fn_Get_Final_Txn_Param(:Dvh_Txn_Code, :Global.Company, 'FINAL_DRAFT_FUT_DAYS');
--:Frm_Usr_En_Prv_Year := Fn_Get_User_Param (:Global.User, 'USR_EN_PRV_YEAR'); --Added by John 10-08-16
V_Cur_Ayr_Code := Fn_Get_Ayr_Code(:Global.Company,'C');
--V_Prv_Ayr_Code := Fn_Get_Ayr_Code(:Global.Company,'P');
V_Next_Ayr_Code := Fn_Get_Ayr_Code(:Global.Company,'N');
--Added by John 10-08-16---
-- Select Ayr_To_Dt Into V_Prev_Dt
-- From M_Ayear
-- Where Ayr_Comp_Code = :Global.Company
-- And Ayr_Code = V_Prv_Ayr_Code;
--Added by John 10-08-16---
Select Ayr_From_Dt Into V_Cur_Dt
From M_Ayear
Where Ayr_Comp_Code = :Global.Company
And Ayr_Code = V_Cur_Ayr_Code;
V_Ayr_Code :=Fn_Get_Date_Ayr(:Global.Company,Dt);
If V_Ayr_Code Is Null Then
Show_Message('Alert1', 'Account year not defined!');
Raise Form_Trigger_Failure;
End If;
--If NVL(:Frm_Usr_En_Prv_Year,'N') = 'N' Then --Added by John 10-08-16
If V_Ayr_Code Not In (V_Cur_Ayr_Code,V_Next_Ayr_Code) Then
Show_Message('Alert1', 'Doc Date not in Curr/Next Account year!');
Raise Form_Trigger_Failure;
End If;
If Dt Between (V_Dt - Nvl(:Frm_Prv_Days,0)) And V_Dt+ Nvl(:Frm_Fut_Days,0) Then
Null;
Else
Show_Message('Alert1', 'Doc Date not in allowed period!');
Raise Form_Trigger_Failure;
End If;
--Elsif NVL(:Frm_Usr_En_Prv_Year,'N') = 'Y' And Dt <= V_Prev_Dt Then --Added by John 10-08-16-------------
--If Dt Between (V_Prev_Dt - Nvl(:Frm_Prv_Days,0)) And V_Prev_Dt+ Nvl(:Frm_Fut_Days,0) Then
--:Dvh_Ayr_Code := V_Prv_Ayr_Code;
--Else
-- Show_Message('Alert1', 'Doc Date not in allowed period!');
-- Raise Form_Trigger_Failure;
--End If;
--End If; --Added by John 10-08-16-------------
IF Dt >= V_Cur_Dt Then
If Dt Between (V_Dt - Nvl(:Frm_Prv_Days,0)) And V_Dt+ Nvl(:Frm_Fut_Days,0) Then
Null;
Else
Show_Message('Alert1', 'Doc Date not in allowed period!');
Raise Form_Trigger_Failure;
End If;
End If;
End;on unit PROC_VALIDATE_DT1(DT): set FRM_PRV_DAYS to FN_GET_FINAL_TXN_PARAM(DVH_TXN_CODE, GLOBAL.COMPANY, 'FINAL_DRAFT_PRV_DAYS') set FRM_FUT_DAYS to FN_GET_FINAL_TXN_PARAM(DVH_TXN_CODE, GLOBAL.COMPANY, 'FINAL_DRAFT_FUT_DAYS') deny when is_blank(FN_GET_DATE_AYR(GLOBAL.COMPANY, ARG.DT)) else "Account year not defined!" deny when not ((ARG.DT >= (sysdate() - nvl(FRM_PRV_DAYS, 0))) and (ARG.DT <= (sysdate() + nvl(FRM_FUT_DAYS, 0)))) else "Doc Date not in allowed period!" # 3 statements did not convert.# line 39 # If V_Ayr_Code Not In (V_Cur_Ayr_Code,V_Next_Ayr_Code) Then # Show_Message('Alert1', 'Doc Date not in Curr/Next Account year!'); # Raise Form_Trigger_Failure; # End If; # reason: the guard names something CRL has no expression node for, so the whole branch is refused rather than have its condition dropped# Select Ayr_From_Dt Into V_Cur_Dt # From M_Ayear # Where Ayr_Comp_Code = :Global.Company # And Ayr_Code = V_Cur_Ayr_Code # reason: its query narrows on V_CUR_AYR_CODE, which this body declares as a local: a formal becomes an :ARG bind and a page value becomes a param, and a local is neither# Show_Message('Alert1', 'Doc Date not in allowed period!'); # Raise Form_Trigger_Failure; # reason: they are dropped with it: its query narrows on V_CUR_AYR_CODE, which this body declares as a local: a formal becomes an :ARG bind and a page value becomes a param, and a local is neither
4 clauses converted, 3 statements refused
PROCEDURE Ref_Doc_Amount IS
BEGIN
If Nvl(:DvrD_ExpH_Doc_Id, 0) > 0 Then
Select Sum(Expd_Lc_Amt), 0 Into :Ref_Dr_Doc_Amt, :Ref_Cr_Doc_Amt
From T_Emp_Exp_Head,T_Emp_Exp_Detail,M_Employee, M_Allowance
Where Expd_Exph_Id =Exph_Id
And Expd_Emp_Code =Emp_Code
And Allowance_Code=Expd_Allowance_Code
And Exph_Comp_Code =:Global.Company
And Exph_Id = :DvrD_ExpH_Doc_Id
And Expd_Pay_Mode ='V'
And Nvl(Expd_Fin_Status,'N') ='N';
End If;
If Nvl(:DvrD_PaySlipH_Doc_Id, 0) > 0 Then
Select Sum(Decode (Paysliph_Pay_Type, 'REC', 0, Payslipd_Lc_Amt)),
Sum(Decode (Paysliph_Pay_Type, 'REC', Payslipd_Lc_Amt, 0))
Into :Ref_Dr_Doc_Amt, :Ref_Cr_Doc_Amt
From T_Payslip_Head,T_Payslip_Detail,M_Employee,M_Payslip_Company
Where Payslipd_Paysliph_Id =Paysliph_Id
And Emp_Code(+) = Paysliph_Emp_Code
And Payslipc_Payslip_Code = Payslipd_Payslip_Code
And Payslipc_Comp_Code =:Global.Company
And Paysliph_Comp_Code =:Global.Company
And Paysliph_Id =:DvrD_PaySlipH_Doc_Id
And Payslipd_Td_Id is Null
And Nvl(Paysliph_Fin_Status,'N') ='N';
End If;
If Nvl(:DvrD_PayH_Doc_Id, 0) > 0 Then
Select Sum(Payd_Actual_Amt), 0 Into :Ref_Dr_Doc_Amt, :Ref_Cr_Doc_Amt from (
Select Payh_Id,Payh_No, PayH_Dt,Emp_Anly_Code,Payd_Id,
PayH_Divn_Code,PayH_Dept_Code,PayH_Emp_Code,Payd_Curr_Code,All_Main_Acnt,
sum(Nvl(Payd_Actual_Amt,0)) Payd_Actual_Amt
From T_Emp_Pay_Head,t_Emp_Pay_Detail,
(Select Emp_Code, Emp_Anly_Code From M_Employee
Union All
Select Temp_Code, TEmp_Anly_Code From T_Employee),
(Select distinct Allowance_Type,Allowance_Code,
Nvl(Link_Main_Acnt_Code,Allowance_Main_Acnt_Code) All_Main_Acnt
From M_Allowance,(Select Link_Main_Acnt_Code,Link_Allow_Code From M_Emp_Exp_Link Where Link_Comp_Code =:Global.Company
and Link_Divn_Code = :Ref_Divn
and Nvl(Link_Main_Acnt_Code,'*') not in('*'))
Where Allowance_Code = Link_Allow_Code(+)
)
Where Payd_Payh_Id =Payh_Id
and PayH_Emp_Code =Emp_Code
and Payh_Comp_Code =:Global.Company
and Payh_Id =:DvrD_PayH_Doc_Id
and Payd_Allowance_Code =Allowance_Code
and Payd_Td_id is Null
Group by Payh_Id,Payh_Dt, Payh_No,PayH_Divn_Code,PayH_Dept_Code,PayH_Emp_Code,Payd_Curr_Code,All_Main_Acnt,Emp_Anly_Code,Payd_Id);
End If;
If Nvl(:DvrD_GrH_Doc_Id, 0) > 0 Then
Select Sum(Gred_Curr_Rate * Gred_Rate), 0 Into :Ref_Dr_Doc_Amt, :Ref_Cr_Doc_Amt
From T_gr_exp,M_Gr_Exp_Company,M_gr_Exp_Fin,T_Gr_Head
Where Gec_Grem_Code =Gred_Grem_Code
and Gred_Grh_Id =Grh_Id
and Grh_Comp_Code =:Global.Company
and GrH_Id =:DvrD_GrH_Doc_Id
And Gec_Comp_Code = :Global.Company
And Gec_Comp_Code = Gef_comp_Code
And Gec_Grem_Code =Gef_Grem_Code
And Gef_Divn_Code =Grh_Divn_Code
And Gred_Rate > 0;
End If;
END;on unit REF_DOC_AMOUNT: # 4 statements did not convert.# line 4 # Select Sum(Expd_Lc_Amt), 0 Into :Ref_Dr_Doc_Amt, :Ref_Cr_Doc_Amt # From T_Emp_Exp_Head,T_Emp_Exp_Detail,M_Employee, M_Allowance # Where Expd_Exph_Id =Exph_Id # And Expd_Emp_Code =Emp_Code # And Allowance_Code=Expd_Allowance_Code # And Exph_Comp_Code =:Global.Company # And Exph_Id = :DvrD_ExpH_Doc_Id # And Expd_Pay_Mode ='V' # And Nvl(Expd_Fin_Status,'N') ='N'; # reason: a source names one aggregate or none, and this selects 1 of them beside 1 other expression, so no one name says what its row carries# line 16 # Select Sum(Decode (Paysliph_Pay_Type, 'REC', 0, Payslipd_Lc_Amt)), # Sum(Decode (Paysliph_Pay_Type, 'REC', Payslipd_Lc_Amt, 0)) # Into :Ref_Dr_Doc_Amt, :Ref_Cr_Doc_Amt # From T_Payslip_Head,T_Payslip_Detail,M_Employee,M_Payslip_Company # Where Payslipd_Paysliph_Id =Paysliph_Id # And Emp_Code(+) = Paysliph_Emp_Code # And Payslipc_Payslip_Code = Payslipd_Payslip_Code # And Payslipc_Comp_Code =:Global.Company # And Paysliph_Comp_Code =:Global.Company # And Paysliph_Id =:DvrD_PaySlipH_Doc_Id # And Payslipd_Td_Id is Null # And Nvl(Paysliph_Fin_Status,'N') ='N'; # reason: a source names one aggregate or none, and this selects 2 of them beside 0 other expressions, so no one name says what its row carries# line 31 # Select Sum(Payd_Actual_Amt), 0 Into :Ref_Dr_Doc_Amt, :Ref_Cr_Doc_Amt from ( # Select Payh_Id,Payh_No, PayH_Dt,Emp_Anly_Code,Payd_Id, # PayH_Divn_Code,PayH_Dept_Code,PayH_Emp_Code,Payd_Curr_Code,All_Main_Acnt, # sum(Nvl(Payd_Actual_Amt,0)) Payd_Actual_Amt # From T_Emp_Pay_Head,t_Emp_Pay_Detail, # (Select Emp_Code, Emp_Anly_Code From M_Employee # Union All # Select Temp_Code, TEmp_Anly_Code From T_Employee), # (Select distinct Allowance_Type,Allowance_Code, # Nvl(Link_Main_Acnt_Code,Allowance_Main_Acnt_Code) All_Main_Acnt # From M_Allowance,(Select Link_Main_Acnt_Code,Link_Allow_Code From M_Emp_Exp_Link Where Link_Comp_Code =:Global.Company # and Link_Divn_Code = :Ref_Divn # and Nvl(Link_Main_Acnt_Code,'*') not in('*')) # Where Allowance_Code = Link_Allow_Code(+) # ) # Where Payd_Payh_Id =Payh_Id # and PayH_Emp_Code =Emp_Code # and Payh_Comp_Code =:Global.Company # and Payh_Id =:DvrD_PayH_Doc_Id # and Payd_Allowance_Code =Allowance_Code # and Payd_Td_id is Null # Group by Payh_Id,Payh_Dt, Payh_No,PayH_Divn_Code,PayH_Dept_Code,PayH_Emp_Code,Payd_Curr_Code,All_Main_Acnt,Emp_Anly_Code,Payd_Id); # reason: a source names one aggregate or none, and this selects 1 of them beside 1 other expression, so no one name says what its row carries# line 56 # Select Sum(Gred_Curr_Rate * Gred_Rate), 0 Into :Ref_Dr_Doc_Amt, :Ref_Cr_Doc_Amt # From T_gr_exp,M_Gr_Exp_Company,M_gr_Exp_Fin,T_Gr_Head # Where Gec_Grem_Code =Gred_Grem_Code # and Gred_Grh_Id =Grh_Id # and Grh_Comp_Code =:Global.Company # and GrH_Id =:DvrD_GrH_Doc_Id # And Gec_Comp_Code = :Global.Company # And Gec_Comp_Code = Gef_comp_Code # And Gec_Grem_Code =Gef_Grem_Code # And Gef_Divn_Code =Grh_Divn_Code # And Gred_Rate > 0; # reason: a source names one aggregate or none, and this selects 1 of them beside 1 other expression, so no one name says what its row carries
0 clauses converted, 4 statements refused
IF :SYSTEM.MODE ='NORMAL' then
If :System.Record_Status = 'INSERT' OR :System.Record_Status = 'NEW' THEN
If :DVH_Doc_Dt Is Null Then
:DVH_DOC_DT := sysdate;
End If;
End if;
END IF;
:Global.Load_Flag :='N';
if :System.Record_Status = 'QUERY' Then
--Disable Editing if Printed or before n Day(s) Invoice
If Nvl(:DVH_Confirmed, ' ') <> ' ' OR Nvl(:DVH_Prn_Count, 0) > 0 OR Nvl(:Dvh_Status, 'N') = ('C') Or :DVH_Doc_Dt + :Global.Edt_Doc_Days < Trunc(SysDate) Then
Set_Block_Property('T_Draft_Voucher_Header', Update_Allowed, Property_False);
Set_Block_Property('T_Draft_Voucher_Detail', Insert_Allowed, Property_False);
Set_Block_Property('T_Draft_Voucher_Detail', Update_Allowed, Property_False);
Set_Block_Property('T_Draft_Voucher_Detail', Delete_Allowed, Property_False);
Set_Item_Property('DvH_Divn_Code', Update_Allowed, Property_False);
Set_Item_Property('DvH_Txn_Code', Enabled, Property_False);
If Nvl(:DVH_Confirmed, ' ') = ' ' And Nvl(:Dvh_Status, 'N') <> ('C') AND :DVH_Doc_Dt + :Global.Edt_Doc_Days >= Trunc(SysDate) Then
If :Frm_Rights_Edt > 0 Then
Set_Block_Property('T_Draft_Voucher_Header', Update_Allowed, Property_True);
Set_Block_Property('T_Draft_Voucher_Detail', Update_Allowed, Property_True);
Set_Block_Property('T_Draft_Voucher_Detail', Insert_Allowed, Property_True);
If :Frm_Rights_Del > 0 then
Set_Block_Property('T_Draft_Voucher_Detail', Delete_Allowed, Property_True);
End If;
ElsIf Nvl(:Frm_Narration_Edit,'N') = 'Y' Then
Set_Block_Property('T_Draft_Voucher_Detail', Update_Allowed, Property_True);
End If;
End If;
Else
If :Frm_Rights_New > 0 Then
Set_Block_Property('T_Draft_Voucher_Header', Insert_Allowed, Property_True);
Else
Set_Block_Property('T_Draft_Voucher_Header', Insert_Allowed, Property_False);
End If;
If :Frm_Rights_Edt > 0 Then
Set_Block_Property('T_Draft_Voucher_Header', Update_Allowed, Property_True);
Set_Block_Property('T_Draft_Voucher_Detail', Update_Allowed, Property_True);
end if;
if :Frm_Rights_New > 0 then
Set_Block_Property('T_Draft_Voucher_Detail', Insert_Allowed, Property_True);
end if;
if :Frm_Rights_Del > 0 then
Set_Block_Property('T_Draft_Voucher_Detail', Delete_Allowed, Property_True);
end if;
End If;
Declare
v_Count Number;
v_Date Date;
Begin
Select sysdate into v_Date from dual;
If :System.Record_Status = 'INSERT' OR :System.Record_Status = 'NEW' THEN
If Nvl(:Frm_Stop_Entry,'Y') ='Y' Then
Select count(*) INTO v_Count From T_Draft_Voucher_Header Where
DvH_Comp_Code =:Global.Company
and Nvl(DvH_Status,'N') ='N'
and Nvl(Dvh_Confirmed,'N') ='N'
and DvH_Valid_Till< v_Date;
If v_Count > 0 Then
Show_Message('Alert1', 'Unposted entries found!,Please confirm all unposted entris to proceed');
Raise Form_Trigger_Failure;
End If;
End If;
End If;
End;
End If;on new record of T_DRAFT_VOUCHER_HEADER: set DVH_DOC_DT to sysdate() when ((SYSTEM.MODE = 'NORMAL') and ((SYSTEM.RECORD_STATUS = 'INSERT') or (SYSTEM.RECORD_STATUS = 'NEW'))) and is_blank(DVH_DOC_DT) set GLOBAL.LOAD_FLAG to 'N' state lock T_DRAFT_VOUCHER_HEADER on update when (SYSTEM.RECORD_STATUS = 'QUERY') and ((((nvl(DVH_CONFIRMED, ' ') <> ' ') or (nvl(DVH_PRN_COUNT, 0) > 0)) or (DVH_STATUS = 'C')) or ((DVH_DOC_DT + GLOBAL.EDT_DOC_DAYS) < trunc(sysdate()))) state lock T_DRAFT_VOUCHER_DETAIL on insert, update, delete when (SYSTEM.RECORD_STATUS = 'QUERY') and ((((nvl(DVH_CONFIRMED, ' ') <> ' ') or (nvl(DVH_PRN_COUNT, 0) > 0)) or (DVH_STATUS = 'C')) or ((DVH_DOC_DT + GLOBAL.EDT_DOC_DAYS) < trunc(sysdate()))) state lock DVH_DIVN_CODE on update when (SYSTEM.RECORD_STATUS = 'QUERY') and ((((nvl(DVH_CONFIRMED, ' ') <> ' ') or (nvl(DVH_PRN_COUNT, 0) > 0)) or (DVH_STATUS = 'C')) or ((DVH_DOC_DT + GLOBAL.EDT_DOC_DAYS) < trunc(sysdate()))) state disable DVH_TXN_CODE when (SYSTEM.RECORD_STATUS = 'QUERY') and ((((nvl(DVH_CONFIRMED, ' ') <> ' ') or (nvl(DVH_PRN_COUNT, 0) > 0)) or (DVH_STATUS = 'C')) or ((DVH_DOC_DT + GLOBAL.EDT_DOC_DAYS) < trunc(sysdate()))) state unlock T_DRAFT_VOUCHER_DETAIL, T_DRAFT_VOUCHER_HEADER on update when (((SYSTEM.RECORD_STATUS = 'QUERY') and ((((nvl(DVH_CONFIRMED, ' ') <> ' ') or (nvl(DVH_PRN_COUNT, 0) > 0)) or (DVH_STATUS = 'C')) or ((DVH_DOC_DT + GLOBAL.EDT_DOC_DAYS) < trunc(sysdate())))) and (((nvl(DVH_CONFIRMED, ' ') = ' ') and (nvl(DVH_STATUS, 'N') <> 'C')) and ((DVH_DOC_DT + GLOBAL.EDT_DOC_DAYS) >= trunc(sysdate())))) and (FRM_RIGHTS_EDT > 0) state unlock T_DRAFT_VOUCHER_DETAIL on insert when (((SYSTEM.RECORD_STATUS = 'QUERY') and ((((nvl(DVH_CONFIRMED, ' ') <> ' ') or (nvl(DVH_PRN_COUNT, 0) > 0)) or (DVH_STATUS = 'C')) or ((DVH_DOC_DT + GLOBAL.EDT_DOC_DAYS) < trunc(sysdate())))) and (((nvl(DVH_CONFIRMED, ' ') = ' ') and (nvl(DVH_STATUS, 'N') <> 'C')) and ((DVH_DOC_DT + GLOBAL.EDT_DOC_DAYS) >= trunc(sysdate())))) and (FRM_RIGHTS_EDT > 0) state unlock T_DRAFT_VOUCHER_DETAIL on delete when ((((SYSTEM.RECORD_STATUS = 'QUERY') and ((((nvl(DVH_CONFIRMED, ' ') <> ' ') or (nvl(DVH_PRN_COUNT, 0) > 0)) or (DVH_STATUS = 'C')) or ((DVH_DOC_DT + GLOBAL.EDT_DOC_DAYS) < trunc(sysdate())))) and (((nvl(DVH_CONFIRMED, ' ') = ' ') and (nvl(DVH_STATUS, 'N') <> 'C')) and ((DVH_DOC_DT + GLOBAL.EDT_DOC_DAYS) >= trunc(sysdate())))) and (FRM_RIGHTS_EDT > 0)) and (FRM_RIGHTS_DEL > 0) state unlock T_DRAFT_VOUCHER_DETAIL on update when ((((SYSTEM.RECORD_STATUS = 'QUERY') and ((((nvl(DVH_CONFIRMED, ' ') <> ' ') or (nvl(DVH_PRN_COUNT, 0) > 0)) or (DVH_STATUS = 'C')) or ((DVH_DOC_DT + GLOBAL.EDT_DOC_DAYS) < trunc(sysdate())))) and (((nvl(DVH_CONFIRMED, ' ') = ' ') and (nvl(DVH_STATUS, 'N') <> 'C')) and ((DVH_DOC_DT + GLOBAL.EDT_DOC_DAYS) >= trunc(sysdate())))) and not (FRM_RIGHTS_EDT > 0)) and (FRM_NARRATION_EDIT = 'Y') state unlock T_DRAFT_VOUCHER_HEADER on insert when ((SYSTEM.RECORD_STATUS = 'QUERY') and not ((((nvl(DVH_CONFIRMED, ' ') <> ' ') or (nvl(DVH_PRN_COUNT, 0) > 0)) or (DVH_STATUS = 'C')) or ((DVH_DOC_DT + GLOBAL.EDT_DOC_DAYS) < trunc(sysdate())))) and (FRM_RIGHTS_NEW > 0) state lock T_DRAFT_VOUCHER_HEADER on insert when ((SYSTEM.RECORD_STATUS = 'QUERY') and not ((((nvl(DVH_CONFIRMED, ' ') <> ' ') or (nvl(DVH_PRN_COUNT, 0) > 0)) or (DVH_STATUS = 'C')) or ((DVH_DOC_DT + GLOBAL.EDT_DOC_DAYS) < trunc(sysdate())))) and not (FRM_RIGHTS_NEW > 0) state unlock T_DRAFT_VOUCHER_DETAIL, T_DRAFT_VOUCHER_HEADER on update when ((SYSTEM.RECORD_STATUS = 'QUERY') and not ((((nvl(DVH_CONFIRMED, ' ') <> ' ') or (nvl(DVH_PRN_COUNT, 0) > 0)) or (DVH_STATUS = 'C')) or ((DVH_DOC_DT + GLOBAL.EDT_DOC_DAYS) < trunc(sysdate())))) and (FRM_RIGHTS_EDT > 0) state unlock T_DRAFT_VOUCHER_DETAIL on insert when ((SYSTEM.RECORD_STATUS = 'QUERY') and not ((((nvl(DVH_CONFIRMED, ' ') <> ' ') or (nvl(DVH_PRN_COUNT, 0) > 0)) or (DVH_STATUS = 'C')) or ((DVH_DOC_DT + GLOBAL.EDT_DOC_DAYS) < trunc(sysdate())))) and (FRM_RIGHTS_NEW > 0) state unlock T_DRAFT_VOUCHER_DETAIL on delete when ((SYSTEM.RECORD_STATUS = 'QUERY') and not ((((nvl(DVH_CONFIRMED, ' ') <> ' ') or (nvl(DVH_PRN_COUNT, 0) > 0)) or (DVH_STATUS = 'C')) or ((DVH_DOC_DT + GLOBAL.EDT_DOC_DAYS) < trunc(sysdate())))) and (FRM_RIGHTS_DEL > 0) # 2 statements did not convert.# Select count(*) INTO v_Count From T_Draft_Voucher_Header Where # DvH_Comp_Code =:Global.Company # and Nvl(DvH_Status,'N') ='N' # and Nvl(Dvh_Confirmed,'N') ='N' # and DvH_Valid_Till< v_Date # reason: its query narrows on V_DATE, which this body declares as a local: a formal becomes an :ARG bind and a page value becomes a param, and a local is neither# Show_Message('Alert1', 'Unposted entries found!,Please confirm all unposted entris to proceed'); # Raise Form_Trigger_Failure; # reason: they are dropped with it: its query narrows on V_DATE, which this body declares as a local: a formal becomes an :ARG bind and a page value becomes a param, and a local is neither
15 clauses converted, 2 statements refused
Procedure Txn_Validate Is
V_Count Number;
V_Status Char(1);
V_Flag Boolean;
Begin
Select Count(*) Into V_Count
From M_Final_Txn
Where Final_Txn_Code = :Dvh_Txn_Code;
If V_Count =0 Then
Message('Invalid transaction code');
Raise Form_Trigger_Failure;
End If;
Select Final_Txn_Name, Final_Txn_Status Into :Txn_Desc, V_Status
From M_Final_Txn
Where Final_Txn_Code = :Dvh_Txn_Code;
--Txn
:Frm_En_Draft :=Fn_Get_Final_Txn_Param(:Dvh_Txn_Code, :Global.Company, 'FINAL_EN_DRAFT_ENTRY');
:Frm_Printer_Name :=Fn_Get_Final_Txn_Param(:Dvh_Txn_Code, :Global.Company, 'FINAL_TXN_PRINTER');
If Nvl(:Frm_En_Draft,'F') ='F' Then
:Dvh_Txn_Code := Null;
Show_Message('Alert1', 'Transaction not enabled for draft voucher');
Raise Form_Trigger_Failure;
End If;
--Check Combination
Select Count(*) Into V_Count From M_Final_Txn_Company
Where Tcomp_Comp_Code = :Global.Company
And Tcomp_Txn_Code = :Dvh_Txn_Code;
If V_Count = 0 Then
:Dvh_Txn_Code := Null;
Show_Message('Alert1', 'Transaction not enabled in this company');
Raise Form_Trigger_Failure;
End If;
--Check Lock Status
If Nvl(V_Status, 'O') = 'L' Then
:Dvh_Txn_Code := Null;
Show_Message('Alert1', 'Transaction Locked');
Raise Form_Trigger_Failure;
End If;
:Frm_Valid_Mainac_Comb:= Fn_Get_Final_Txn_Param(:Dvh_Txn_Code, :Global.Company, 'FINAL_VALID_MAINAC_COMB');
Proc_Valid_Finaltxn_Usergroup(:Global.Company,:Dvh_Txn_Code,:Global.User,V_Flag);
If V_Flag =False Then
:Dvh_Txn_Code := Null;
Show_Message('Alert1', 'Transaction not enabled for this User');
Raise Form_Trigger_Failure;
End If;
:Frm_Doc_No_Gen := Fn_Get_Final_Txn_Param(:Dvh_Txn_Code, :Global.Company, 'FINAL_TXN_DOC_GEN');
:Frm_Printer := Fn_Get_Final_Txn_Param(:Dvh_Txn_Code, :Global.Company, 'FINAL_TXN_PRINTER');
:Frm_Rep_Desformat := Fn_Get_Final_Txn_Param(:Dvh_Txn_Code, :Global.Company, 'FINAL_REP_DESFORMAT');
:Frm_Txn_Valid_Days := Fn_Get_Final_Txn_Param(:Dvh_Txn_Code, :Global.Company, 'FINAL_DRAFT_VALID_DAYS');
:Global.Doc_No := :Frm_Doc_No_Gen;
If :Frm_Doc_No_Gen = 'M' Then
:Dvh_Doc_No :='';
Set_Item_Property('DVH_Doc_No', Required, Property_True);
Set_Item_Property('DVH_DOC_NO', Enabled, Property_True);
Enable_Text('DVH_DOC_NO','M');
If Get_Item_Property ('DVH_DOC_DT', Enabled) = 'TRUE' Then
Enable_Text ('DVH_DOC_DT', Fn_Get_Final_Txn_Param (:Dvh_Txn_Code, :Global.Company, 'PRINTREQ_EN_DT'));
End If;
Else
:Dvh_Doc_No :='';
Set_Item_Property('DVH_Doc_No', Required, Property_False);
Set_Item_Property('DVH_DOC_NO', Enabled, Property_False);
Enable_Text('DVH_DOC_NO','F');
If Get_Item_Property ('DVH_DOC_DT', Enabled) = 'TRUE' Then
Enable_Text ('DVH_DOC_DT', Fn_Get_Final_Txn_Param (:Dvh_Txn_Code, :Global.Company, 'PRINTREQ_EN_DT'));
End If;
End If;
End;on unit TXN_VALIDATE: from FINAL_TXN_COUNT(DVH_TXN_CODE) # load-fmb-draft-voucher-txn-validate-unit-0 from FINAL_TXN(DVH_TXN_CODE) when not (FINAL_TXN_COUNT.COUNT = 0) # load-fmb-draft-voucher-txn-validate-unit-1 from FINAL_TXN_COMPANY(DVH_TXN_CODE) # load-fmb-draft-voucher-txn-validate-unit-2 exists of FINAL_TXN_COUNT else "Invalid transaction code" set TXN_DESC to FINAL_TXN.FINAL_TXN_NAME set FRM_EN_DRAFT to FN_GET_FINAL_TXN_PARAM(DVH_TXN_CODE, GLOBAL.COMPANY, 'FINAL_EN_DRAFT_ENTRY') set FRM_PRINTER_NAME to FN_GET_FINAL_TXN_PARAM(DVH_TXN_CODE, GLOBAL.COMPANY, 'FINAL_TXN_PRINTER') set DVH_TXN_CODE to null when nvl(FRM_EN_DRAFT, 'F') = 'F' deny when nvl(FRM_EN_DRAFT, 'F') = 'F' else "Transaction not enabled for draft voucher" fetch FINAL_TXN_COMPANY set DVH_TXN_CODE to null when FINAL_TXN_COMPANY.COUNT = 0 deny when FINAL_TXN_COMPANY.COUNT = 0 else "Transaction not enabled in this company" set DVH_TXN_CODE to null when FINAL_TXN.FINAL_TXN_STATUS = 'L' deny when FINAL_TXN.FINAL_TXN_STATUS = 'L' else "Transaction Locked" set FRM_VALID_MAINAC_COMB to FN_GET_FINAL_TXN_PARAM(DVH_TXN_CODE, GLOBAL.COMPANY, 'FINAL_VALID_MAINAC_COMB') call PROC_VALID_FINALTXN_USERGROUP(GLOBAL.COMPANY, DVH_TXN_CODE, GLOBAL.USER, null) set FRM_DOC_NO_GEN to FN_GET_FINAL_TXN_PARAM(DVH_TXN_CODE, GLOBAL.COMPANY, 'FINAL_TXN_DOC_GEN') set FRM_PRINTER to FN_GET_FINAL_TXN_PARAM(DVH_TXN_CODE, GLOBAL.COMPANY, 'FINAL_TXN_PRINTER') set FRM_REP_DESFORMAT to FN_GET_FINAL_TXN_PARAM(DVH_TXN_CODE, GLOBAL.COMPANY, 'FINAL_REP_DESFORMAT') set FRM_TXN_VALID_DAYS to FN_GET_FINAL_TXN_PARAM(DVH_TXN_CODE, GLOBAL.COMPANY, 'FINAL_DRAFT_VALID_DAYS') set GLOBAL.DOC_NO to FRM_DOC_NO_GEN set DVH_DOC_NO to '' when FRM_DOC_NO_GEN = 'M' state require DVH_DOC_NO when FRM_DOC_NO_GEN = 'M' state enable DVH_DOC_NO when FRM_DOC_NO_GEN = 'M' call ENABLE_TEXT('T_DRAFT_VOUCHER_HEADER.DVH_DOC_NO', 'M') when FRM_DOC_NO_GEN = 'M' call ENABLE_TEXT('T_DRAFT_VOUCHER_HEADER.DVH_DOC_DT', FN_GET_FINAL_TXN_PARAM(DVH_TXN_CODE, GLOBAL.COMPANY, 'PRINTREQ_EN_DT')) when (FRM_DOC_NO_GEN = 'M') and enabled of DVH_DOC_DT set DVH_DOC_NO to '' when not (FRM_DOC_NO_GEN = 'M') state optional DVH_DOC_NO when not (FRM_DOC_NO_GEN = 'M') state disable DVH_DOC_NO when not (FRM_DOC_NO_GEN = 'M') call ENABLE_TEXT('T_DRAFT_VOUCHER_HEADER.DVH_DOC_NO', 'F') when not (FRM_DOC_NO_GEN = 'M') call ENABLE_TEXT('T_DRAFT_VOUCHER_HEADER.DVH_DOC_DT', FN_GET_FINAL_TXN_PARAM(DVH_TXN_CODE, GLOBAL.COMPANY, 'PRINTREQ_EN_DT')) when not (FRM_DOC_NO_GEN = 'M') and enabled of DVH_DOC_DT # 1 statement did not convert.# line 50 # If V_Flag =False Then # :Dvh_Txn_Code := Null; # Show_Message('Alert1', 'Transaction not enabled for this User'); # Raise Form_Trigger_Failure; # End If; # reason: the guard reads FALSE, which is one of Forms' own constants and not a value: CRL has no expression for what a property or an alert button is called
28 clauses converted, 1 statement refused
Declare
v_Count Number;
Begin
If :Ref_Barcode Is Not Null Then
Select ExpH_Id, PayslipH_Id, Grh_Id, DvH_Id, Payh_Id, Comp_code, Divn_Code, Trans_Code, Doc_No
Into :DvrD_ExpH_Doc_Id, :DvrD_PayslipH_Doc_Id, :Dvrd_GrH_Doc_Id, :Dvrd_DvH_Doc_Id, :DvrD_PayH_Doc_Id,
:Ref_Comp, :Ref_Divn, :Ref_Txn, :Ref_No
From
(
Select Distinct ExpH_Id, Null PayslipH_Id, Null GrH_Id, Null DvH_Id, Null Payh_Id, Exph_Comp_Code Comp_code,
ExpH_Divn_Code Divn_Code, ExpH_Pay_Trans_Code Trans_Code, Exph_No Doc_No, ExpH_Barcode Ref_Barcode
From T_Emp_Exp_Head,T_Emp_Exp_Detail
Where Expd_Exph_Id =Exph_Id
and Exph_Ayr_Code =Fn_Get_AYr_Code(:Global.Company, 'C')
and Expd_Pay_Mode ='V'
and Nvl(Expd_Fin_Status,'N') ='N'
And Exph_Comp_Code = :Global.Company
Union All
Select Distinct Null, PayslipH_Id, Null, Null, Null, PAYSLIPH_COMP_CODE,Paysliph_Divn_Code,
PAYSLIPH_TXN_CODE, PAYSLIPH_NO, PAYSLIPH_BARCODE
From T_Payslip_Head,T_Payslip_Detail,M_Employee,M_Payslip_Company
Where Payslipd_Paysliph_Id =Paysliph_Id
And Emp_Code(+) = Paysliph_Pay_To
And Payslipc_Payslip_Code = Payslipd_Payslip_Code
And Payslipc_Comp_Code =:Global.Company
And Paysliph_Comp_Code =:Global.Company
And (Paysliph_Ayr_Code =Fn_Get_Ayr_Code(:Global.Company, 'C')
Or Paysliph_Ayr_Code =Fn_Get_Ayr_Code(:Global.Company, 'P'))
And Payslipd_Td_Id is Null
And Nvl(Paysliph_Fin_Status,'N') ='N'
Union All
Select Distinct Null, Null, GrH_Id, Null, Null, Grh_Comp_Code, GrH_Divn_Code, Grh_Txn_Code,
GrH_No, Grh_Barcode
From T_gr_exp,M_Gr_Exp_Company,M_gr_Exp_Fin,T_Gr_Head
Where Gec_Grem_Code =Gred_Grem_Code
and Gred_Grh_Id =Grh_Id
and Grh_Comp_Code =:Global.Company
And Gec_Comp_Code = :Global.Company
And Gec_Comp_Code = Gef_comp_Code
And Gec_Grem_Code =Gef_Grem_Code
And Gef_Divn_Code =Grh_Divn_Code
And Gred_Rate > 0
Union All
Select Distinct Null, Null, Null, DvH_Id, Null, DvH_Comp_Code, DvH_Divn_Code, DvH_Txn_Code,
DvH_Doc_No, DvH_Barcode
From T_Draft_Voucher_Header,T_Draft_Voucher_Detail
Where Dvd_DvH_id = DvH_id
and DvH_Comp_Code =:Global.Company
Union All
Select Distinct Null, Null, Null, Null, Payh_Id, Payh_Comp_Code, Payh_Divn_Code, Payh_Pay_Trans_Code,
Payh_No, PayH_Barcode
From T_Emp_Pay_Head,T_Emp_Pay_Detail,
(Select Emp_Code, Emp_Comp_Code, Emp_Divn_Code From M_Employee
Union All
Select TEmp_Code, TEmp_Comp_Code, TEmp_Divn_Code From T_Employee),
(Select distinct Link_Divn_Code, Allowance_Type,Allowance_Code,
Nvl(Link_Main_Acnt_Code,Allowance_Main_Acnt_Code) All_Main_Acnt
From M_Allowance,(Select Link_Divn_Code, Link_Main_Acnt_Code,Link_Allow_Code From M_Emp_Exp_Link
Where Link_Comp_Code = :Global.Company
And Nvl(Link_Main_Acnt_Code,'*') Not In('*'))
Where Allowance_Code = Link_Allow_Code(+))
Where Payd_Payh_Id =Payh_Id
And Payh_Emp_Code =Emp_Code
And Payh_Comp_Code = :Global.Company
And Payd_Allowance_Code =Allowance_Code
and Payd_Td_id is Null
)
Where Ref_Barcode = :Ref_Barcode;
:Chk_Flag:= 'Y';
End If;
If Nvl(:DvrD_PayslipH_Doc_Id, 0) > 0 Then
Select Count(*) Into v_Count From T_Payslip_Head
Where Paysliph_Id = :DvrD_PayslipH_Doc_Id And Nvl(PayslipH_Approval_Status, 'N') = 'F';
If v_Count = 0 Then
Show_Message('Alert1', 'Document not approved!');
:Chk_Flag:= 'N';
Raise Form_Trigger_Failure;
End If;
End If;
Exception When No_Data_Found Then
Show_Message('Alert1', 'No document found on the barcode!');
Raise Form_Trigger_Failure;
End;on change of REF_BARCODE: from SOURCE(REF_BARCODE) when is_filled(REF_BARCODE) # load-fmb-draft-voucher-t-draft-voucher-ref-doc-ref-barcode-when-validate-item-change-0 from PAYSLIP_HEAD(DVRD_PAYSLIPH_DOC_ID) # load-fmb-draft-voucher-t-draft-voucher-ref-doc-ref-barcode-when-validate-item-change-1 set DVRD_EXPH_DOC_ID to SOURCE.EXPH_ID when is_filled(REF_BARCODE) set DVRD_PAYSLIPH_DOC_ID to SOURCE.PAYSLIPH_ID when is_filled(REF_BARCODE) set DVRD_GRH_DOC_ID to SOURCE.GRH_ID when is_filled(REF_BARCODE) set DVRD_DVH_DOC_ID to SOURCE.DVH_ID when is_filled(REF_BARCODE) set DVRD_PAYH_DOC_ID to SOURCE.PAYH_ID when is_filled(REF_BARCODE) set REF_COMP to SOURCE.COMP_CODE when is_filled(REF_BARCODE) set REF_DIVN to SOURCE.DIVN_CODE when is_filled(REF_BARCODE) set REF_TXN to SOURCE.TRANS_CODE when is_filled(REF_BARCODE) set REF_NO to SOURCE.DOC_NO when is_filled(REF_BARCODE) set CHK_FLAG to 'Y' when is_filled(REF_BARCODE) fetch PAYSLIP_HEAD when nvl(SOURCE.PAYSLIPH_ID, 0) > 0 warn "Document not approved!" when (nvl(SOURCE.PAYSLIPH_ID, 0) > 0) and (PAYSLIP_HEAD.COUNT = 0) set CHK_FLAG to 'N' when (nvl(SOURCE.PAYSLIPH_ID, 0) > 0) and (PAYSLIP_HEAD.COUNT = 0) deny when (nvl(SOURCE.PAYSLIPH_ID, 0) > 0) and (PAYSLIP_HEAD.COUNT = 0) silent # 1 statement did not convert.# line 82 # Exception When No_Data_Found Then # Show_Message('Alert1', 'No document found on the barcode!'); # Raise Form_Trigger_Failure; # reason: it handles NO_DATA_FOUND and re-raises, and CRL has no clause that runs when a statement fails: the error path ends the program either way, so the statements above it convert and the handler does not
14 clauses converted, 1 statement refused
PROCEDURE Load_Draft_Voucher IS
Cursor C1 is Select DvH_id, DvH_Comp_Code, DvH_Divn_Code,
DvH_Ayr_Code, DvH_Txn_Code, DvH_Doc_No,
DvH_Doc_Dt, DvH_Doc_Ref, DvH_Doc_Ref_Dt,
DvH_Doc_Due_Dt, DvH_Txn_Status, DvH_Desc,
DvH_Annotation, DvH_Conf_Dt,
Dvd_Id, Dvd_Seq_No,
Dvd_Main_Acnt_Code, Dvd_Divn_Code, Dvd_Dept_Code,
Dvd_Anly_Code_1, Dvd_Acty_Code_1, Dvd_Acty_Value, Dvd_Curr_Code,
Dvd_Doc_Drcr_Flag, Dvd_Lc_Amt, Dvd_Fc_Amt,
Dvd_Invoice_Ref, Dvd_Invoice_Due_Dt, Dvd_OTh_Ref,
Dvd_Invoice_Dt,Dvd_Desc
From T_Draft_Voucher_Header,T_Draft_Voucher_Detail
Where Dvd_DvH_id = DvH_id
and DvH_Comp_Code =:Global.Company
and DvH_Divn_Code= :Ref_Divn
and DvH_Txn_Code =:Ref_Txn
and DvH_Doc_No =:Ref_No
Order by Dvd_Id;
v_Count Number;
v_Count1 Number;
v_Cnt Number;
v_divn_code Varchar2(10);
v_dept_code Varchar2(10);
v_Anly_Code Varchar2(10);
v_Count3 NUMBER;--TO DELETE
v_Txn_Flag Varchar2(10);
v_Txn_Type Varchar2(10);
v_Desc Varchar2(1000);
v_Annot Varchar2(1000);
Begin
:Global.Load_Flag :='Y';
Go_Block('T_Draft_Voucher_Detail');
Last_Record;
IF :System.Last_Record = 'TRUE' THEN
Last_Record;
Next_Record;
ELSE
First_Record;
END IF;
For Cur in C1 loop
If C1%NotFound Then
Exit;
Else
:Load_Flag := 'Loaded';
:Dvd_Main_Acnt_Code :=Cur.Dvd_Main_Acnt_Code;
:Dvd_Anly_code_1 :=Cur.Dvd_Anly_code_1;
:Dvd_Divn_Code :=Cur.Dvd_Divn_Code;
:Dvd_Dept_Code :=Cur.Dvd_Dept_Code;
:Dvd_Curr_Code :=Cur.Dvd_Curr_Code;
:Dvd_Fc_Amt :=Cur.Dvd_Fc_Amt;
:Dvd_Lc_Amt :=Cur.Dvd_Lc_Amt;
:Dvd_Seq_No := to_number( :System.Cursor_Record);
:Dvd_Doc_DrCr_Flag :=Cur.Dvd_Doc_DrCr_Flag;
:Dvd_Desc :=Cur.Dvd_Desc;
:Dvd_Invoice_Ref :=Cur.Dvd_Invoice_Ref;
:Dvd_Invoice_Due_Dt :=Sysdate;
:Dvd_Invoice_Dt :=Sysdate;
:Dvd_Acty_Code_1 :=Cur.Dvd_Acty_Code_1;
v_Desc :=Cur.DvH_Desc;
v_Annot :=Cur.DvH_Annotation;
Select Count(*) Into v_Count
From M_Main_Account
Where Main_Acnt_Code = :Dvd_Main_Acnt_Code
And Main_Acty_Code = :Dvd_Acty_Code_1
And Nvl(Main_Acnt_Status,'O')='O';
If v_Count > 0 Then
:Dvd_Acty_Value :=Cur.Dvd_Acty_Value;
End If;
Next_Record;
End If;
End Loop;
First_Record;
:Global.Load_Flag :='N';
Set_item_Property('Load_Btn',Enabled,Property_False);
Go_Block('T_Draft_Voucher_Header');
:DvH_Desc :=v_Desc;
:DvH_Annotation := v_Annot;
End;on unit LOAD_DRAFT_VOUCHER: set GLOBAL.LOAD_FLAG to 'Y' go to T_DRAFT_VOUCHER_DETAIL last record of T_DRAFT_VOUCHER_DETAIL last record when SYSTEM.LAST_RECORD = 'TRUE' next record when SYSTEM.LAST_RECORD = 'TRUE' first record when not (SYSTEM.LAST_RECORD = 'TRUE') first record set GLOBAL.LOAD_FLAG to 'N' state disable LOAD_BTN go to T_DRAFT_VOUCHER_HEADER # 3 statements did not convert.# line 47 # For Cur in C1 loop # If C1%NotFound Then # Exit; # Else # :Load_Flag := 'Loaded'; # :Dvd_Main_Acnt_Code :=Cur.Dvd_Main_Acnt_Code; # :Dvd_Anly_code_1 :=Cur.Dvd_Anly_code_1; # :Dvd_Divn_Code :=Cur.Dvd_Divn_Code; # :Dvd_Dept_Code :=Cur.Dvd_Dept_Code; # :Dvd_Curr_Code :=Cur.Dvd_Curr_Code; # :Dvd_Fc_Amt :=Cur.Dvd_Fc_Amt; # :Dvd_Lc_Amt :=Cur.Dvd_Lc_Amt; # :Dvd_Seq_No := to_number( :System.Cursor_Record); # :Dvd_Doc_DrCr_Flag :=Cur.Dvd_Doc_DrCr_Flag; # :Dvd_Desc :=Cur.Dvd_Desc; # :Dvd_Invoice_Ref :=Cur.Dvd_Invoice_Ref; # :Dvd_Invoice_Due_Dt :=Sysdate; # :Dvd_Invoice_Dt :=Sysdate; # :Dvd_Acty_Code_1 :=Cur.Dvd_Acty_Code_1; # v_Desc :=Cur.DvH_Desc; # v_Annot :=Cur.DvH_Annotation; # # Select Count(*) Into v_Count # From M_Main_Account # Where Main_Acnt_Code = :Dvd_Main_Acnt_Code # And Main_Acty_Code = :Dvd_Acty_Code_1 # And Nvl(Main_Acnt_Status,'O')='O'; # # If v_Count > 0 Then # :Dvd_Acty_Value :=Cur.Dvd_Acty_Value; # End If; # Next_Record; # End If; # End Loop; # reason: it reads a row per iteration, and a per-row check source belongs to the for each: the clause carries a lookup this converter does not yet build (crl-loops.md operation 1)# line 85 # :DvH_Desc :=v_Desc; # reason: no recognizer claims it, and the vocabulary has no clause for what it does# line 86 # :DvH_Annotation := v_Annot; # reason: no recognizer claims it, and the vocabulary has no clause for what it does
10 clauses converted, 3 statements refused
PROCEDURE Load_Payroll IS
Cursor CurPay Is Select * from (
Select Payh_Id,Payh_No, PayH_Dt,Emp_Anly_Code,Payd_Id,
PayH_Divn_Code,PayH_Dept_Code,PayH_Emp_Code,Payd_Curr_Code,All_Main_Acnt,
sum(Nvl(Payd_Actual_Amt,0)) Payd_Actual_Amt
From T_Emp_Pay_Head,t_Emp_Pay_Detail,
(Select Emp_Code, Emp_Anly_Code, Emp_Comp_Code, Emp_Divn_Code From M_Employee
Union All
Select TEmp_Code, TEmp_Anly_Code, TEmp_Comp_Code, TEmp_Divn_Code From T_Employee),
(Select distinct Allowance_Type,Allowance_Code,
Nvl(Link_Main_Acnt_Code,Allowance_Main_Acnt_Code) All_Main_Acnt
From M_Allowance,(Select Link_Main_Acnt_Code,Link_Allow_Code From M_Emp_Exp_Link Where Link_Comp_Code =:Global.Company
and Link_Divn_Code = :Ref_Divn
and Nvl(Link_Main_Acnt_Code,'*') not in('*'))
Where Allowance_Code = Link_Allow_Code(+)
)
Where Payd_Payh_Id =Payh_Id
and PayH_Emp_Code =Emp_Code
and Payh_Comp_Code =:Global.Company
and Payh_divn_Code =:Ref_Divn
and PayH_Pay_Trans_Code =:Ref_Txn
and PayH_No = :Ref_No
and Payd_Allowance_Code =Allowance_Code
and Payd_Td_id is Null
Group by Payh_Id,Payh_Dt, Payh_No,PayH_Divn_Code,PayH_Dept_Code,PayH_Emp_Code,Payd_Curr_Code,All_Main_Acnt,Emp_Anly_Code,Payd_Id);
v_Count Number;
v_Count1 Number;
v_Cnt Number;
v_divn_code Varchar2(10);
v_dept_code Varchar2(10);
v_Anly_Code Varchar2(10);
v_Txn_Flag Varchar2(10);
v_Txn_Type Varchar2(10);
v_Group Varchar2(10);
Begin
v_Count :=0;
Select Count(*) Into v_Count from M_Pay_transaction
Where Ptrans_code= :Ref_Txn;
If v_Count >0 Then
Select Ptrans_Group_Code Into v_Group from M_Pay_transaction
Where Ptrans_code= :Ref_Txn;
End If;
:Global.Load_Flag :='Y';
If Nvl(v_Group,' ') In ('PAYSLIP','PAY-OTH', 'EMP-PAY', 'TEMP-PAY') Then
Go_Block('T_Draft_Voucher_Detail');
Last_Record;
IF :System.Last_Record = 'TRUE' THEN
Last_Record;
Next_Record;
ELSE
First_Record;
END IF;
For Cur in CurPay loop
If CurPay%NotFound Then
Exit;
Else
v_divn_code := Cur.PayH_Divn_Code;
v_dept_code := Cur.PayH_Dept_Code;
v_Anly_Code := Cur.Emp_Anly_Code;
Select Count(*) INTO v_Count From M_Analysis Where Anly_Code =Cur.Emp_Anly_Code;
If Nvl(v_Count,0)= 0 Then
Insert Into M_Analysis(Anly_Code,Anly_Name,Anly_Short_Name,Anly_Cr_User,Anly_Cr_Dt)
Select Emp_Anly_Code,Emp_Name,Substr(Emp_Short_Name,1,20),:Global.User,Sysdate From M_Employee
Where Emp_Anly_Code =Cur.Emp_Anly_Code And Emp_Status_Code in (1,2);
Insert Into M_Analysis_Company(Acomp_Comp_Code,Acomp_Anly_Code,Acomp_Cr_User,Acomp_Cr_Dt)
Values (:Global.Company,Cur.Emp_Anly_Code,:Global.User,Sysdate);
Else
Select Count(*) INTO v_Cnt From M_Analysis_company Where Acomp_Anly_Code =Cur.Emp_Anly_Code
and Acomp_Comp_Code =:Global.Company;
If Nvl(v_Cnt,0) =0 Then
Insert Into M_Analysis_Company(Acomp_Comp_Code,Acomp_Anly_Code,Acomp_Cr_User,Acomp_Cr_Dt)
Values (:Global.Company,Cur.Emp_Anly_Code,:Global.User,Sysdate);
End If;
End If;
:Load_Flag := 'Loaded';
:Dvd_Main_Acnt_Code :=Cur.All_Main_Acnt;
:Dvd_Anly_code_1 :=v_Anly_Code;
:Dvd_Divn_Code :=v_divn_code;
:Dvd_Dept_Code :=v_dept_code;
:Dvd_Curr_Code :=Cur.Payd_Curr_Code;
:Dvd_Fc_Amt :=Cur.Payd_Actual_Amt ;
:Dvd_Lc_Amt :=Cur.Payd_Actual_Amt ;
:Dvd_Seq_No := to_number( :System.Cursor_Record);
:Dvd_Doc_DrCr_Flag :='D';
:Dvd_Desc :=Null;
:Doc_Id :=Cur.Payd_Id;
:Ref_Doc_Txn := :Ref_Txn;
Next_Record;
End If;
End Loop;
End If;
First_Record;
:Global.Load_Flag :='N';
End;
on unit LOAD_PAYROLL: from PAY_TRANSACTION_COUNT(REF_TXN) # load-fmb-draft-voucher-load-payroll-unit-0 from PAY_TRANSACTION(REF_TXN) when PAY_TRANSACTION_COUNT.COUNT > 0 # load-fmb-draft-voucher-load-payroll-unit-1 set GLOBAL.LOAD_FLAG to 'Y' go to T_DRAFT_VOUCHER_DETAIL when (((PAY_TRANSACTION.PTRANS_GROUP_CODE = 'PAYSLIP') or (PAY_TRANSACTION.PTRANS_GROUP_CODE = 'PAY-OTH')) or (PAY_TRANSACTION.PTRANS_GROUP_CODE = 'EMP-PAY')) or (PAY_TRANSACTION.PTRANS_GROUP_CODE = 'TEMP-PAY') last record of T_DRAFT_VOUCHER_DETAIL when (((PAY_TRANSACTION.PTRANS_GROUP_CODE = 'PAYSLIP') or (PAY_TRANSACTION.PTRANS_GROUP_CODE = 'PAY-OTH')) or (PAY_TRANSACTION.PTRANS_GROUP_CODE = 'EMP-PAY')) or (PAY_TRANSACTION.PTRANS_GROUP_CODE = 'TEMP-PAY') last record when ((((PAY_TRANSACTION.PTRANS_GROUP_CODE = 'PAYSLIP') or (PAY_TRANSACTION.PTRANS_GROUP_CODE = 'PAY-OTH')) or (PAY_TRANSACTION.PTRANS_GROUP_CODE = 'EMP-PAY')) or (PAY_TRANSACTION.PTRANS_GROUP_CODE = 'TEMP-PAY')) and (SYSTEM.LAST_RECORD = 'TRUE') next record when ((((PAY_TRANSACTION.PTRANS_GROUP_CODE = 'PAYSLIP') or (PAY_TRANSACTION.PTRANS_GROUP_CODE = 'PAY-OTH')) or (PAY_TRANSACTION.PTRANS_GROUP_CODE = 'EMP-PAY')) or (PAY_TRANSACTION.PTRANS_GROUP_CODE = 'TEMP-PAY')) and (SYSTEM.LAST_RECORD = 'TRUE') first record when ((((PAY_TRANSACTION.PTRANS_GROUP_CODE = 'PAYSLIP') or (PAY_TRANSACTION.PTRANS_GROUP_CODE = 'PAY-OTH')) or (PAY_TRANSACTION.PTRANS_GROUP_CODE = 'EMP-PAY')) or (PAY_TRANSACTION.PTRANS_GROUP_CODE = 'TEMP-PAY')) and not (SYSTEM.LAST_RECORD = 'TRUE') first record set GLOBAL.LOAD_FLAG to 'N' # 1 statement did not convert.# line 58 # For Cur in CurPay loop # If CurPay%NotFound Then # Exit; # Else # v_divn_code := Cur.PayH_Divn_Code; # v_dept_code := Cur.PayH_Dept_Code; # v_Anly_Code := Cur.Emp_Anly_Code; # # Select Count(*) INTO v_Count From M_Analysis Where Anly_Code =Cur.Emp_Anly_Code; # If Nvl(v_Count,0)= 0 Then # Insert Into M_Analysis(Anly_Code,Anly_Name,Anly_Short_Name,Anly_Cr_User,Anly_Cr_Dt) # Select Emp_Anly_Code,Emp_Name,Substr(Emp_Short_Name,1,20),:Global.User,Sysdate From M_Employee # Where Emp_Anly_Code =Cur.Emp_Anly_Code And Emp_Status_Code in (1,2); # Insert Into M_Analysis_Company(Acomp_Comp_Code,Acomp_Anly_Code,Acomp_Cr_User,Acomp_Cr_Dt) # Values (:Global.Company,Cur.Emp_Anly_Code,:Global.User,Sysdate); # Else # Select Count(*) INTO v_Cnt From M_Analysis_company Where Acomp_Anly_Code =Cur.Emp_Anly_Code # and Acomp_Comp_Code =:Global.Company; # If Nvl(v_Cnt,0) =0 Then # Insert Into M_Analysis_Company(Acomp_Comp_Code,Acomp_Anly_Code,Acomp_Cr_User,Acomp_Cr_Dt) # Values (:Global.Company,Cur.Emp_Anly_Code,:Global.User,Sysdate); # End If; # End If; # # :Load_Flag := 'Loaded'; # :Dvd_Main_Acnt_Code :=Cur.All_Main_Acnt; # :Dvd_Anly_code_1 :=v_Anly_Code; # :Dvd_Divn_Code :=v_divn_code; # :Dvd_Dept_Code :=v_dept_code; # :Dvd_Curr_Code :=Cur.Payd_Curr_Code; # :Dvd_Fc_Amt :=Cur.Payd_Actual_Amt ; # :Dvd_Lc_Amt :=Cur.Payd_Actual_Amt ; # :Dvd_Seq_No := to_number( :System.Cursor_Record); # :Dvd_Doc_DrCr_Flag :='D'; # :Dvd_Desc :=Null; # :Doc_Id :=Cur.Payd_Id; # :Ref_Doc_Txn := :Ref_Txn; # Next_Record; # # End If; # End Loop; # reason: it selects *, which a row cannot be read by a name
8 clauses converted, 1 statement refused
PROCEDURE Load_Petty_Cash IS
Cursor Cur_pay Is Select Dpa_Comp_Code, Dpa_Divn_Code Fin_Divn_Code, DPA_Main_Acnt_Code DP_Main_Acnt_Code,Ptgc_Main_acnt_Code,
Dpad_Anly_Code Dp_Anly_Code,Dpad_Acty_Code Dp_Acty_Code, Ptg_En_User_Main_Acnt,
Sum(Decode(DPAD_Txn_Type,'P',Dpad_amount,0)) Dp_Pay_Amt, Max(Dpad_Desc) Dp_Desc From
T_Divn_Petty_Acnt,T_Divn_Petty_Acnt_Detail,
(Select Ptg_Id,Ptg_Code, Ptgc_Comp_Code,Ptgc_Main_acnt_Code, Ptg_En_User_Main_Acnt
From M_Petty_Txn_Grp, M_Petty_Txn_Grp_Company
Where Ptg_Id =Ptgc_Ptg_Id
and Ptgc_Comp_Code =:Global.Company)
Where DPAD_DPA_Id =DPA_Id
and Dpad_Ptg_Id =Ptg_Id
and Dpa_Comp_Code =:Global.Company
and Dpa_Divn_Code =:Ref_Divn
and Dpad_Txn_Type ='P'
and Dpad_Fin_Batch_Id =:Ref_No
and Nvl(Dpad_Fin_Status,'N') ='N'
Group by Dpa_Comp_Code, Dpa_Divn_Code, DPA_Main_Acnt_Code ,Ptgc_Main_acnt_Code,
Dpad_Anly_Code ,Dpad_Acty_Code, Ptg_En_User_Main_Acnt;
v_Count Number;
v_Count1 Number;
v_Cnt Number;
v_Comp_Code Varchar2(10);
v_divn_code Varchar2(10);
v_dept_code Varchar2(10);
v_Anly_Code Varchar2(10);
v_Txn_Flag Varchar2(10);
v_Txn_Type Varchar2(10);
v_Group Varchar2(10);
v_Curr_Code Varchar2(10);
v_Txn_Txn Varchar2(10);
v_Cr_Main Varchar2(10);
v_Dr_Main Varchar2(10);
v_Cr_Anly Varchar2(10);
v_Total Number := 0;
Begin
If :Ref_Txn Is Null Then
Proc_Valid_fin_trans_setup(:Global.Company, :Ref_Divn, 'PETTY',v_Comp_Code,v_divn_code,v_dept_code, v_Txn_Txn, v_Cr_Main, v_Dr_Main, v_Cr_Anly);
v_Count :=0;
:Global.Load_Flag :='Y';
Go_Block('T_Draft_Voucher_Detail');
Last_Record;
IF :System.Last_Record = 'TRUE' THEN
Last_Record;
Next_Record;
ELSE
First_Record;
END IF;
For Cur in Cur_pay loop
If Cur_pay%NotFound Then
Exit;
End If;
If Nvl(Cur.Ptg_En_User_Main_Acnt, 'N') = 'Y' Then
If :Frm_Usr_Main_Acnt Is Null Then
Show_message('Req_alert','User main Account not enabled');
Raise Form_Trigger_Failure;
Else
v_Dr_Main := :Frm_Usr_Main_Acnt;
End If;
Else
v_Dr_Main := CUR.Ptgc_Main_acnt_Code;
End If;
v_divn_code := Cur.Fin_Divn_Code;
v_dept_code := v_Dept_Code;
:Load_Flag := 'Loaded';
:Dvd_Main_Acnt_Code := v_Dr_Main;
:Dvd_Divn_Code := v_divn_code;
:Dvd_Dept_Code := v_dept_code;
:DvD_Anly_Code_1 := Cur.Dp_Anly_Code;
:DvD_Acty_Code_1 := Cur.Dp_Acty_Code;
:Dvd_Curr_Code := :Frm_Default_Curr;
:Dvd_Fc_Amt := Cur.Dp_Pay_Amt;
:Dvd_Lc_Amt := Cur.Dp_Pay_Amt;
:Dvd_Seq_No := to_number( :System.Cursor_Record);
:Dvd_Doc_DrCr_Flag := 'D';
:Dvd_Desc :='PETTY CASH PAYMENT REF:'||:Ref_No||' '||Cur.Dp_Desc;
--:Doc_Id :=Cur.Payd_Id;
:Petty_Txn := 'PETTY';
:Ref_Doc_Txn := :Ref_Txn;
v_Total := v_Total + Cur.Dp_Pay_Amt;
Next_Record;
End Loop;
If :Frm_Usr_Main_Acnt Is Not Null And v_Total>0 Then
:Load_Flag := 'Loaded';
:Dvd_Main_Acnt_Code := :Frm_Usr_Main_Acnt;
:Dvd_Divn_Code := v_divn_code;
:Dvd_Dept_Code := v_dept_code;
:Dvd_Curr_Code := :Frm_Default_Curr;
:Dvd_Fc_Amt := v_Total;
:Dvd_Lc_Amt := v_Total;
:Dvd_Seq_No := to_number(:System.Cursor_Record);
:Dvd_Doc_DrCr_Flag := 'C';
:Dvd_Desc :='PETTY CASH PAYMENT REF:'||:Ref_No;
:Petty_Txn := 'PETTY';
:Ref_Doc_Txn := :Ref_Txn;
End If;
First_Record;
:Global.Load_Flag :='N';
End If;
END;on unit LOAD_PETTY_CASH: call PROC_VALID_FIN_TRANS_SETUP(GLOBAL.COMPANY, REF_DIVN, 'PETTY', null, null, null, null, null, null, null) when is_blank(REF_TXN) set GLOBAL.LOAD_FLAG to 'Y' when is_blank(REF_TXN) go to T_DRAFT_VOUCHER_DETAIL when is_blank(REF_TXN) last record of T_DRAFT_VOUCHER_DETAIL when is_blank(REF_TXN) last record when is_blank(REF_TXN) and (SYSTEM.LAST_RECORD = 'TRUE') next record when is_blank(REF_TXN) and (SYSTEM.LAST_RECORD = 'TRUE') first record when is_blank(REF_TXN) and not (SYSTEM.LAST_RECORD = 'TRUE') first record when is_blank(REF_TXN) set GLOBAL.LOAD_FLAG to 'N' when is_blank(REF_TXN) # 2 statements did not convert.# line 51 # For Cur in Cur_pay loop # If Cur_pay%NotFound Then # Exit; # End If; # # If Nvl(Cur.Ptg_En_User_Main_Acnt, 'N') = 'Y' Then # If :Frm_Usr_Main_Acnt Is Null Then # Show_message('Req_alert','User main Account not enabled'); # Raise Form_Trigger_Failure; # Else # v_Dr_Main := :Frm_Usr_Main_Acnt; # End If; # Else # v_Dr_Main := CUR.Ptgc_Main_acnt_Code; # End If; # # v_divn_code := Cur.Fin_Divn_Code; # v_dept_code := v_Dept_Code; # # :Load_Flag := 'Loaded'; # :Dvd_Main_Acnt_Code := v_Dr_Main; # :Dvd_Divn_Code := v_divn_code; # :Dvd_Dept_Code := v_dept_code; # :DvD_Anly_Code_1 := Cur.Dp_Anly_Code; # :DvD_Acty_Code_1 := Cur.Dp_Acty_Code; # :Dvd_Curr_Code := :Frm_Default_Curr; # :Dvd_Fc_Amt := Cur.Dp_Pay_Amt; # :Dvd_Lc_Amt := Cur.Dp_Pay_Amt; # :Dvd_Seq_No := to_number( :System.Cursor_Record); # :Dvd_Doc_DrCr_Flag := 'D'; # :Dvd_Desc :='PETTY CASH PAYMENT REF:'||:Ref_No||' '||Cur.Dp_Desc; # # :Petty_Txn := 'PETTY'; # :Ref_Doc_Txn := :Ref_Txn; # v_Total := v_Total + Cur.Dp_Pay_Amt; # Next_Record; # # End Loop; # reason: its body holds a statement no recognizer claims, and a for each with one dropped runs the rest against every row: :Dvd_Main_Acnt_Code := v_Dr_Main# line 89 # If :Frm_Usr_Main_Acnt Is Not Null And v_Total>0 Then # :Load_Flag := 'Loaded'; # :Dvd_Main_Acnt_Code := :Frm_Usr_Main_Acnt; # :Dvd_Divn_Code := v_divn_code; # :Dvd_Dept_Code := v_dept_code; # :Dvd_Curr_Code := :Frm_Default_Curr; # :Dvd_Fc_Amt := v_Total; # :Dvd_Lc_Amt := v_Total; # :Dvd_Seq_No := to_number(:System.Cursor_Record); # :Dvd_Doc_DrCr_Flag := 'C'; # :Dvd_Desc :='PETTY CASH PAYMENT REF:'||:Ref_No; # :Petty_Txn := 'PETTY'; # :Ref_Doc_Txn := :Ref_Txn; # End If; # reason: the guard reads the local V_TOTAL, which a loop body above it counts with: `V_TOTAL := V_TOTAL + CUR.DP_PAY_AMT`, so what it holds here is the loop's own arithmetic, and crl-loops.md states the collection operation and not the bookkeeping around it
9 clauses converted, 2 statements refused
Declare
PL_Id ParamList;
v_Report VarChar2(30) := 'print_draft_voucher';
v_Rep_Id Report_Object;
v_Rep_Job_Id VarChar2(100);
v_Job_Id VarChar2(100);
v_Rep_Status VarChar2(100);
v_Rep_URL VarChar2(1000);
v_Host_Name VarChar2(100) := :Global.Rep_Host_Name;
v_Port VarChar2(100) := :Global.Rep_Port;
v_Rep_Server VarChar2(100) := :Global.Rep_Server;
v_Log_Id Number(10);
v_Dt Date;
v_Printer_Name Varchar(20);
V_Confirm Varchar(10);
V_Doc_No Number(10);
V_Txn Varchar(10);
V_Ayr_Code Varchar(10);
Begin
If :Frm_Printer Is Not Null Then
v_Printer_Name := :Frm_Printer;
ElsIf :Mnu_Printer Is Not Null Then
v_Printer_Name := :Mnu_Printer;
End If;
PL_Id := Get_Parameter_List('Print');
If Not Id_Null(Pl_Id) Then
Destroy_Parameter_List(Pl_Id);
End If;
PL_Id := Create_Parameter_List('Print');
Select Sysdate INTO v_Dt From Dual;
Select Nvl(Dvh_Confirmed, 'O') Into V_Confirm
From T_Draft_Voucher_Header
Where Dvh_Comp_Code = :Global.Company
And (:Dvh_Divn_Code Is Null Or Dvh_Divn_Code = :Dvh_Divn_Code)
And Dvh_Ayr_Code = :Dvh_Ayr_Code
And Dvh_Txn_Code = :Dvh_Txn_Code
And Dvh_Doc_No = :Dvh_Doc_No;
If V_Confirm = 'Y' Then
Select Th_Doc_No, Th_Txn_Code, Th_Ayr_Code Into V_Doc_No,V_Txn,V_Ayr_Code
From T_Cur_Trans_Header
Where Th_Comp_Code = :Global.Company
And(:Dvh_Divn_Code Is Null Or Th_Divn_Code = :Dvh_Divn_Code)
And Th_Ayr_Code = :Dvh_Ayr_Code
And Th_Id = :Dvh_Th_Id;
V_Report := Lower(Fn_Get_Final_Txn_Param (V_Txn,:Global.Company,'FINAL_REPORT'));
If V_Report Is Null Then
V_Report := 'rep_voucher';
End If;
Else
V_Doc_No := :Dvh_Doc_No;
V_Txn := :Dvh_Txn_Code;
V_Ayr_Code := :Dvh_Ayr_Code;
V_Report := 'print_draft_voucher';
End If;
Add_Parameter(PL_Id, 'Comp_Code', Text_Parameter, :Global.Company);
Add_Parameter(PL_Id, 'Txn', Text_Parameter, V_Txn);
Add_Parameter(PL_Id, 'Ayr_Code', Text_Parameter, V_Ayr_Code);
Add_Parameter(PL_Id, 'Divn', Text_Parameter, :DvH_Divn_Code);
Add_Parameter(PL_Id, 'Doc_No_Fm', Text_Parameter, V_Doc_No);
Add_Parameter(PL_Id, 'Doc_No_To', Text_Parameter, V_Doc_No);
Add_Parameter(PL_Id, 'Usr_Id', Text_Parameter, :Global.User);
Add_Parameter(PL_Id, 'Rep_Id', Text_Parameter, :Global.System_Product || '.' || :Parameter.Menu_Code);
Add_Parameter(PL_Id, 'Comp_Name', Text_Parameter, :Global.Company_Name);
Add_Parameter(Pl_Id, 'ParamForm', Text_Parameter, 'No');
--Find Report Object
v_Rep_Id := Find_Report_Object('print_draft_voucher');
--Communication Mode
Set_Report_Object_Property(v_Rep_Id, Report_Comm_Mode, Synchronous);
Set_Report_Object_Property(v_Rep_Id, Report_Desformat, Nvl(:Frm_Rep_Desformat,'PDF'));
If :Mnu_Dest_Name = 'PRINTER' Then
Set_Report_Object_Property(v_Rep_Id, Report_DesType, PRINTER);
If :Mnu_Printer Is Not Null Then
Set_Report_Object_Property(v_Rep_Id, Report_DesName, :Mnu_Printer);
End If;
Else
Set_Report_Object_Property(v_Rep_Id, Report_DesType,CACHE);
End If;
--Specify Report Server and Report File Name
Set_Report_Object_Property(v_Rep_Id, Report_Server, v_Rep_Server);
Set_Report_Object_Property(v_Rep_Id, Report_FileName, v_Report);
--Run Report
v_Rep_Job_Id := Run_Report_Object(v_Rep_Id, PL_Id);
v_Rep_Status := Report_Object_Status(v_Rep_Job_Id);
Proc_Insert_DivnTxn_Print_Log(:DvH_Comp_Code,:DvH_Divn_Code,:DvH_Ayr_Code,:DvH_Txn_Code,:DvH_Doc_No,:DvH_Doc_No,v_Dt,:Global.User);
standard.commit;
SET_CUSTOM_PROPERTY('CTRL.PRINTBEAN',1,'DEFAULT_PRINTER',Nvl(:Frm_Printer_Name, :Mnu_Printer));
If v_Rep_Status = 'FINISHED' Then
If Upper(:Mnu_Dest_Name) = 'PRINTER' Then
v_Job_Id := SubStr(v_Rep_Job_Id, length(v_Rep_Server)+2);
v_Rep_URL := 'http://' || v_Host_Name || ':' || v_Port || '/reports/rwservlet/getjobid' || v_Job_Id || '?server=' || v_Rep_Server;
Message(v_Rep_URL);
SET_CUSTOM_PROPERTY('CTRL.PRINTBEAN',1,'FILE_NAME',v_Rep_URL);
SET_CUSTOM_PROPERTY('CTRL.PRINTBEAN',1,'PRINT_FILE','');
--Web.Show_Document(v_Rep_URL, '_blank');
Elsif Upper(:Mnu_Dest_Name) = 'CACHE' Then
v_Job_Id := SubStr(v_Rep_Job_Id, length(v_Rep_Server)+2);
v_Rep_URL := 'http://' || v_Host_Name || ':' || v_Port || '/reports/rwservlet/getjobid' || v_Job_Id || '?server=' || v_Rep_Server;
Message(v_Rep_URL);
Web.Show_Document(v_Rep_URL, '_blank');
End If;
Else
Message('Error Running Report');
End If;
End ;
on press of PRINT_BTN: from DRAFT_VOUCHER_HEADER(DVH_AYR_CODE, DVH_DIVN_CODE, DVH_DOC_NO, DVH_TXN_CODE) # load-fmb-draft-voucher-ctrl-print-btn-press-0 from CUR_TRANS_HEADER(DVH_AYR_CODE, DVH_DIVN_CODE, DVH_TH_ID) when DRAFT_VOUCHER_HEADER.V_CONFIRM = 'Y' # load-fmb-draft-voucher-ctrl-print-btn-press-1 call PROC_INSERT_DIVNTXN_PRINT_LOG(DVH_COMP_CODE, DVH_DIVN_CODE, DVH_AYR_CODE, DVH_TXN_CODE, DVH_DOC_NO, DVH_DOC_NO, sysdate(), GLOBAL.USER) # 14 statements did not convert.# line 63 # Add_Parameter(PL_Id, 'Comp_Code', Text_Parameter, :Global.Company); # reason: the report's name is read from the local V_REPORT, which a branch above it writes on the arms of a chain, an arm of which writes it again below its own assignment, so the arms are not its value. The name is read off Report_FileName where the body sets one and never off the report object, because a body that overrode the file runs a different report from the one it found# line 64 # Add_Parameter(PL_Id, 'Txn', Text_Parameter, V_Txn); # reason: the report's name is read from the local V_REPORT, which a branch above it writes on the arms of a chain, an arm of which writes it again below its own assignment, so the arms are not its value. The name is read off Report_FileName where the body sets one and never off the report object, because a body that overrode the file runs a different report from the one it found# line 65 # Add_Parameter(PL_Id, 'Ayr_Code', Text_Parameter, V_Ayr_Code); # reason: the report's name is read from the local V_REPORT, which a branch above it writes on the arms of a chain, an arm of which writes it again below its own assignment, so the arms are not its value. The name is read off Report_FileName where the body sets one and never off the report object, because a body that overrode the file runs a different report from the one it found# line 66 # Add_Parameter(PL_Id, 'Divn', Text_Parameter, :DvH_Divn_Code); # reason: the report's name is read from the local V_REPORT, which a branch above it writes on the arms of a chain, an arm of which writes it again below its own assignment, so the arms are not its value. The name is read off Report_FileName where the body sets one and never off the report object, because a body that overrode the file runs a different report from the one it found# line 67 # Add_Parameter(PL_Id, 'Doc_No_Fm', Text_Parameter, V_Doc_No); # reason: the report's name is read from the local V_REPORT, which a branch above it writes on the arms of a chain, an arm of which writes it again below its own assignment, so the arms are not its value. The name is read off Report_FileName where the body sets one and never off the report object, because a body that overrode the file runs a different report from the one it found# line 68 # Add_Parameter(PL_Id, 'Doc_No_To', Text_Parameter, V_Doc_No); # reason: the report's name is read from the local V_REPORT, which a branch above it writes on the arms of a chain, an arm of which writes it again below its own assignment, so the arms are not its value. The name is read off Report_FileName where the body sets one and never off the report object, because a body that overrode the file runs a different report from the one it found# line 69 # Add_Parameter(PL_Id, 'Usr_Id', Text_Parameter, :Global.User); # reason: the report's name is read from the local V_REPORT, which a branch above it writes on the arms of a chain, an arm of which writes it again below its own assignment, so the arms are not its value. The name is read off Report_FileName where the body sets one and never off the report object, because a body that overrode the file runs a different report from the one it found# line 70 # Add_Parameter(PL_Id, 'Rep_Id', Text_Parameter, :Global.System_Product || '.' || :Parameter.Menu_Code); # reason: the report's name is read from the local V_REPORT, which a branch above it writes on the arms of a chain, an arm of which writes it again below its own assignment, so the arms are not its value. The name is read off Report_FileName where the body sets one and never off the report object, because a body that overrode the file runs a different report from the one it found# line 71 # Add_Parameter(PL_Id, 'Comp_Name', Text_Parameter, :Global.Company_Name); # reason: the report's name is read from the local V_REPORT, which a branch above it writes on the arms of a chain, an arm of which writes it again below its own assignment, so the arms are not its value. The name is read off Report_FileName where the body sets one and never off the report object, because a body that overrode the file runs a different report from the one it found# line 72 # Add_Parameter(Pl_Id, 'ParamForm', Text_Parameter, 'No'); # reason: the report's name is read from the local V_REPORT, which a branch above it writes on the arms of a chain, an arm of which writes it again below its own assignment, so the arms are not its value. The name is read off Report_FileName where the body sets one and never off the report object, because a body that overrode the file runs a different report from the one it found# line 97 # v_Rep_Job_Id := Run_Report_Object(v_Rep_Id, PL_Id); # reason: the report's name is read from the local V_REPORT, which a branch above it writes on the arms of a chain, an arm of which writes it again below its own assignment, so the arms are not its value. The name is read off Report_FileName where the body sets one and never off the report object, because a body that overrode the file runs a different report from the one it found# line 101 # standard.commit; # reason: G13: mid-trigger DML and the transaction boundary are refused, not converted# line 104 # SET_CUSTOM_PROPERTY('CTRL.PRINTBEAN',1,'DEFAULT_PRINTER',Nvl(:Frm_Printer_Name, :Mnu_Printer)); # reason: 'CTRL.PRINTBEAN' is a bean for printing, a Bean Area, and component-tracker.md tier 4.4 rules Bean Areas will not be built: they are a Forms applet's own protocol and the web has no equivalent# line 106 # If v_Rep_Status = 'FINISHED' Then # If Upper(:Mnu_Dest_Name) = 'PRINTER' Then # v_Job_Id := SubStr(v_Rep_Job_Id, length(v_Rep_Server)+2); # v_Rep_URL := 'http://' || v_Host_Name || ':' || v_Port || '/reports/rwservlet/getjobid' || v_Job_Id || '?server=' || v_Rep_Server; # Message(v_Rep_URL); # SET_CUSTOM_PROPERTY('CTRL.PRINTBEAN',1,'FILE_NAME',v_Rep_URL); # SET_CUSTOM_PROPERTY('CTRL.PRINTBEAN',1,'PRINT_FILE',''); # Else # If Upper(:Mnu_Dest_Name) = 'CACHE' Then # v_Job_Id := SubStr(v_Rep_Job_Id, length(v_Rep_Server)+2); # v_Rep_URL := 'http://' || v_Host_Name || ':' || v_Port || '/reports/rwservlet/getjobid' || v_Job_Id || '?server=' || v_Rep_Server; # Message(v_Rep_URL); # Web.Show_Document(v_Rep_URL, '_blank'); # End If; # End If; # Else # Message('Error Running Report'); # End If; # reason: the guard reads the local V_REP_STATUS, which is written from something CRL has no expression for: a Forms built-in, a database call or a shape the reader refuses
1 clause converted, 14 statements refused
Declare
PL_Id ParamList;
v_Report VarChar2(30) := 'print_draft_voucher';
v_Rep_Id Report_Object;
v_Rep_Job_Id VarChar2(100);
v_Job_Id VarChar2(100);
v_Rep_Status VarChar2(100);
v_Rep_URL VarChar2(1000);
v_Host_Name VarChar2(100) := :Global.Rep_Host_Name;
v_Port VarChar2(100) := :Global.Rep_Port;
v_Rep_Server VarChar2(100) := :Global.Rep_Server;
v_Log_Id Number(10);
v_Dt Date;
v_Printer_Name Varchar(20);
V_Count Number(10);
V_Confirm Varchar(10);
V_Doc_No Number(10);
V_Txn Varchar(10);
V_Ayr_Code Varchar(10);
Begin
If :System.Form_Status <> 'QUERY' Then
-- If :DvH_Doc_Dt is Not Null Then
-- proc_validate_dt1(:DvH_Doc_Dt);
-- End If;
If nvl(:Debit_total,0)= 0 or nvl(:credit_total,0)= 0 or (:debit_total <> :credit_total) Then
Show_Message('Alert1', 'Debit and Credit not tallying');
Raise Form_Trigger_Failure;
End If;
If :Dvh_Doc_Dt is Null Then
Show_Message('Alert1', 'Document Date Cannot Be Null');
Raise Form_Trigger_Failure;
End If;
Go_Block ('T_DRAFT_VOUCHER_DETAIL');
First_Record;
Loop
If :Dvd_Main_Acnt_Code Is Not Null Then
Select Count(*) Into V_Count
From M_Division,M_Department
Where Divn_Comp_Code = Dept_Comp_Code
And Divn_Code = Dept_Divn_Code
And Divn_Comp_Code = :Global.Company
And Divn_Code = :Dvd_Divn_Code
And Dept_Code = :Dvd_Dept_Code;
If V_Count = 0 Then
Show_Message('Alert1', 'Incorrect Division / Departmrnt Code!');
Go_Item('DVD_DIVN_CODE');
Raise Form_Trigger_Failure;
End If;
End If;
If :System.Last_Record = 'TRUE' Then
Exit;
End If;
Next_Record;
End Loop;
COMMIT_FORM;
If :System.Form_Status <> 'QUERY' Then
Show_Message('Alert1', 'ERROR, Document cannot be saved!');
Raise Form_Trigger_Failure;
End If;
End if;
If Nvl(:DVH_Prn_Count, 0) > 0 AND :Frm_Rights_Prn = 0 Then
Exit_Form;
Else
If :Frm_Printer Is Not Null Then
v_Printer_Name := :Frm_Printer;
ElsIf :Mnu_Printer Is Not Null Then
v_Printer_Name := :Mnu_Printer;
End If;
PL_Id := Get_Parameter_List('Print');
If Not Id_Null(Pl_Id) Then
Destroy_Parameter_List(Pl_Id);
End If;
PL_Id := Create_Parameter_List('Print');
Select Sysdate INTO v_Dt From Dual;
Select Nvl(Dvh_Confirmed, 'O') Into V_Confirm
From T_Draft_Voucher_Header
Where Dvh_Comp_Code = :Global.Company
And (:Dvh_Divn_Code Is Null Or Dvh_Divn_Code = :Dvh_Divn_Code)
And Dvh_Ayr_Code = :Dvh_Ayr_Code
And Dvh_Txn_Code = :Dvh_Txn_Code
And Dvh_Doc_No = :Dvh_Doc_No;
If V_Confirm = 'Y' Then
Select Th_Doc_No, Th_Txn_Code, Th_Ayr_Code Into V_Doc_No,V_Txn,V_Ayr_Code
From T_Cur_Trans_Header
Where Th_Comp_Code = :Global.Company
And(:Dvh_Divn_Code Is Null Or Th_Divn_Code = :Dvh_Divn_Code)
And Th_Ayr_Code = :Dvh_Ayr_Code
And Th_Id = :Dvh_Th_Id;
V_Report := Lower(Fn_Get_Final_Txn_Param (V_Txn,:Global.Company,'FINAL_REPORT'));
If V_Report Is Null Then
V_Report := 'rep_voucher';
End If;
Else
V_Doc_No := :Dvh_Doc_No;
V_Txn := :Dvh_Txn_Code;
V_Ayr_Code := :Dvh_Ayr_Code;
V_Report := 'print_draft_voucher';
End If;
Add_Parameter(PL_Id, 'Comp_Code', Text_Parameter, :Global.Company);
Add_Parameter(PL_Id, 'Txn', Text_Parameter, V_Txn);
Add_Parameter(PL_Id, 'Ayr_Code', Text_Parameter, V_Ayr_Code);
Add_Parameter(PL_Id, 'Divn', Text_Parameter, :DvH_Divn_Code);
Add_Parameter(PL_Id, 'Doc_No_Fm', Text_Parameter, V_Doc_No);
Add_Parameter(PL_Id, 'Doc_No_To', Text_Parameter, V_Doc_No);
Add_Parameter(PL_Id, 'Usr_Id', Text_Parameter, :Global.User);
Add_Parameter(PL_Id, 'Rep_Id', Text_Parameter, :Global.System_Product || '.' || :Parameter.Menu_Code);
Add_Parameter(PL_Id, 'Comp_Name', Text_Parameter, :Global.Company_Name);
Add_Parameter(Pl_Id, 'ParamForm', Text_Parameter, 'No');
--Find Report Object
v_Rep_Id := Find_Report_Object('print_draft_voucher');
--Communication Mode
Set_Report_Object_Property(v_Rep_Id, Report_Comm_Mode, Synchronous);
Set_Report_Object_Property(v_Rep_Id, Report_Desformat, Nvl(:Frm_Rep_Desformat,'PDF'));
If :Mnu_Dest_Name = 'PRINTER' Then
Set_Report_Object_Property(v_Rep_Id, Report_DesType, PRINTER);
If :Mnu_Printer Is Not Null Then
Set_Report_Object_Property(v_Rep_Id, Report_DesName, :Mnu_Printer);
End If;
Else
Set_Report_Object_Property(v_Rep_Id, Report_DesType,CACHE);
End If;
--Specify Report Server and Report File Name
Set_Report_Object_Property(v_Rep_Id, Report_Server, v_Rep_Server);
Set_Report_Object_Property(v_Rep_Id, Report_FileName, v_Report);
--Run Report
v_Rep_Job_Id := Run_Report_Object(v_Rep_Id, PL_Id);
v_Rep_Status := Report_Object_Status(v_Rep_Job_Id);
Proc_Insert_DivnTxn_Print_Log(:DvH_Comp_Code,:DvH_Divn_Code,:DvH_Ayr_Code,:DvH_Txn_Code,:DvH_Doc_No,:DvH_Doc_No,v_Dt,:Global.User);
standard.commit;
SET_CUSTOM_PROPERTY('CTRL.PRINTBEAN',1,'DEFAULT_PRINTER',Nvl(:Frm_Printer_Name, :Mnu_Printer));
If v_Rep_Status = 'FINISHED' Then
If Upper(:Mnu_Dest_Name) = 'PRINTER' Then
v_Job_Id := SubStr(v_Rep_Job_Id, length(v_Rep_Server)+2);
v_Rep_URL := 'http://' || v_Host_Name || ':' || v_Port || '/reports/rwservlet/getjobid' || v_Job_Id || '?server=' || v_Rep_Server;
Message(v_Rep_URL);
SET_CUSTOM_PROPERTY('CTRL.PRINTBEAN',1,'FILE_NAME',v_Rep_URL);
SET_CUSTOM_PROPERTY('CTRL.PRINTBEAN',1,'PRINT_FILE','');
--Web.Show_Document(v_Rep_URL, '_blank');
Elsif Upper(:Mnu_Dest_Name) = 'CACHE' Then
v_Job_Id := SubStr(v_Rep_Job_Id, length(v_Rep_Server)+2);
v_Rep_URL := 'http://' || v_Host_Name || ':' || v_Port || '/reports/rwservlet/getjobid' || v_Job_Id || '?server=' || v_Rep_Server;
Message(v_Rep_URL);
Web.Show_Document(v_Rep_URL, '_blank');
End If;
Else
Message('Error Running Report');
End If;
Clear_Form;
Init_Form;
End If;
End ; on commit: from DRAFT_VOUCHER_HEADER(DVH_AYR_CODE, DVH_DIVN_CODE, DVH_DOC_NO, DVH_TXN_CODE) when not ((nvl(DVH_PRN_COUNT, 0) > 0) and (FRM_RIGHTS_PRN = 0)) # load-fmb-draft-voucher-fmb-draft-voucher-key-commit-commit-0 from CUR_TRANS_HEADER(DVH_AYR_CODE, DVH_DIVN_CODE, DVH_TH_ID) when not ((nvl(DVH_PRN_COUNT, 0) > 0) and (FRM_RIGHTS_PRN = 0)) and (DRAFT_VOUCHER_HEADER.V_CONFIRM = 'Y') # load-fmb-draft-voucher-fmb-draft-voucher-key-commit-commit-1 deny when (SYSTEM.FORM_STATUS <> 'QUERY') and (((nvl(DEBIT_TOTAL, 0) = 0) or (nvl(CREDIT_TOTAL, 0) = 0)) or (DEBIT_TOTAL <> CREDIT_TOTAL)) else "Debit and Credit not tallying" require DVH_DOC_DT else "Document Date Cannot Be Null" when SYSTEM.FORM_STATUS <> 'QUERY' go to T_DRAFT_VOUCHER_DETAIL when SYSTEM.FORM_STATUS <> 'QUERY' deny when (SYSTEM.FORM_STATUS <> 'QUERY') and (SYSTEM.FORM_STATUS <> 'QUERY') else "ERROR, Document cannot be saved!" close screen when (nvl(DVH_PRN_COUNT, 0) > 0) and (FRM_RIGHTS_PRN = 0) call PROC_INSERT_DIVNTXN_PRINT_LOG(DVH_COMP_CODE, DVH_DIVN_CODE, DVH_AYR_CODE, DVH_TXN_CODE, DVH_DOC_NO, DVH_DOC_NO, sysdate(), GLOBAL.USER) when not ((nvl(DVH_PRN_COUNT, 0) > 0) and (FRM_RIGHTS_PRN = 0)) clear form when not ((nvl(DVH_PRN_COUNT, 0) > 0) and (FRM_RIGHTS_PRN = 0)) # 15 statements did not convert.# line 37 # Loop # If :Dvd_Main_Acnt_Code Is Not Null Then # Select Count(*) Into V_Count # From M_Division,M_Department # Where Divn_Comp_Code = Dept_Comp_Code # And Divn_Code = Dept_Divn_Code # And Divn_Comp_Code = :Global.Company # And Divn_Code = :Dvd_Divn_Code # And Dept_Code = :Dvd_Dept_Code; # If V_Count = 0 Then # Show_Message('Alert1', 'Incorrect Division / Departmrnt Code!'); # Go_Item('DVD_DIVN_CODE'); # Raise Form_Trigger_Failure; # End If; # End If; # If :System.Last_Record = 'TRUE' Then # Exit; # End If; # Next_Record; # End Loop; # reason: it reads a row per iteration, and a per-row check source belongs to the for each: the clause carries a lookup this converter does not yet build (crl-loops.md operation 1)# line 109 # Add_Parameter(PL_Id, 'Comp_Code', Text_Parameter, :Global.Company); # reason: the report's name is read from the local V_REPORT, which a branch above it writes on the arms of a chain, an arm of which writes it again below its own assignment, so the arms are not its value. The name is read off Report_FileName where the body sets one and never off the report object, because a body that overrode the file runs a different report from the one it found# line 110 # Add_Parameter(PL_Id, 'Txn', Text_Parameter, V_Txn); # reason: the report's name is read from the local V_REPORT, which a branch above it writes on the arms of a chain, an arm of which writes it again below its own assignment, so the arms are not its value. The name is read off Report_FileName where the body sets one and never off the report object, because a body that overrode the file runs a different report from the one it found# line 111 # Add_Parameter(PL_Id, 'Ayr_Code', Text_Parameter, V_Ayr_Code); # reason: the report's name is read from the local V_REPORT, which a branch above it writes on the arms of a chain, an arm of which writes it again below its own assignment, so the arms are not its value. The name is read off Report_FileName where the body sets one and never off the report object, because a body that overrode the file runs a different report from the one it found# line 112 # Add_Parameter(PL_Id, 'Divn', Text_Parameter, :DvH_Divn_Code); # reason: the report's name is read from the local V_REPORT, which a branch above it writes on the arms of a chain, an arm of which writes it again below its own assignment, so the arms are not its value. The name is read off Report_FileName where the body sets one and never off the report object, because a body that overrode the file runs a different report from the one it found# line 113 # Add_Parameter(PL_Id, 'Doc_No_Fm', Text_Parameter, V_Doc_No); # reason: the report's name is read from the local V_REPORT, which a branch above it writes on the arms of a chain, an arm of which writes it again below its own assignment, so the arms are not its value. The name is read off Report_FileName where the body sets one and never off the report object, because a body that overrode the file runs a different report from the one it found# line 114 # Add_Parameter(PL_Id, 'Doc_No_To', Text_Parameter, V_Doc_No); # reason: the report's name is read from the local V_REPORT, which a branch above it writes on the arms of a chain, an arm of which writes it again below its own assignment, so the arms are not its value. The name is read off Report_FileName where the body sets one and never off the report object, because a body that overrode the file runs a different report from the one it found# line 115 # Add_Parameter(PL_Id, 'Usr_Id', Text_Parameter, :Global.User); # reason: the report's name is read from the local V_REPORT, which a branch above it writes on the arms of a chain, an arm of which writes it again below its own assignment, so the arms are not its value. The name is read off Report_FileName where the body sets one and never off the report object, because a body that overrode the file runs a different report from the one it found# line 116 # Add_Parameter(PL_Id, 'Rep_Id', Text_Parameter, :Global.System_Product || '.' || :Parameter.Menu_Code); # reason: the report's name is read from the local V_REPORT, which a branch above it writes on the arms of a chain, an arm of which writes it again below its own assignment, so the arms are not its value. The name is read off Report_FileName where the body sets one and never off the report object, because a body that overrode the file runs a different report from the one it found# line 117 # Add_Parameter(PL_Id, 'Comp_Name', Text_Parameter, :Global.Company_Name); # reason: the report's name is read from the local V_REPORT, which a branch above it writes on the arms of a chain, an arm of which writes it again below its own assignment, so the arms are not its value. The name is read off Report_FileName where the body sets one and never off the report object, because a body that overrode the file runs a different report from the one it found# line 118 # Add_Parameter(Pl_Id, 'ParamForm', Text_Parameter, 'No'); # reason: the report's name is read from the local V_REPORT, which a branch above it writes on the arms of a chain, an arm of which writes it again below its own assignment, so the arms are not its value. The name is read off Report_FileName where the body sets one and never off the report object, because a body that overrode the file runs a different report from the one it found# line 143 # v_Rep_Job_Id := Run_Report_Object(v_Rep_Id, PL_Id); # reason: the report's name is read from the local V_REPORT, which a branch above it writes on the arms of a chain, an arm of which writes it again below its own assignment, so the arms are not its value. The name is read off Report_FileName where the body sets one and never off the report object, because a body that overrode the file runs a different report from the one it found# line 147 # standard.commit; # reason: G13: mid-trigger DML and the transaction boundary are refused, not converted# line 150 # SET_CUSTOM_PROPERTY('CTRL.PRINTBEAN',1,'DEFAULT_PRINTER',Nvl(:Frm_Printer_Name, :Mnu_Printer)); # reason: 'CTRL.PRINTBEAN' is a bean for printing, a Bean Area, and component-tracker.md tier 4.4 rules Bean Areas will not be built: they are a Forms applet's own protocol and the web has no equivalent# line 152 # If v_Rep_Status = 'FINISHED' Then # If Upper(:Mnu_Dest_Name) = 'PRINTER' Then # v_Job_Id := SubStr(v_Rep_Job_Id, length(v_Rep_Server)+2); # v_Rep_URL := 'http://' || v_Host_Name || ':' || v_Port || '/reports/rwservlet/getjobid' || v_Job_Id || '?server=' || v_Rep_Server; # Message(v_Rep_URL); # SET_CUSTOM_PROPERTY('CTRL.PRINTBEAN',1,'FILE_NAME',v_Rep_URL); # SET_CUSTOM_PROPERTY('CTRL.PRINTBEAN',1,'PRINT_FILE',''); # Else # If Upper(:Mnu_Dest_Name) = 'CACHE' Then # v_Job_Id := SubStr(v_Rep_Job_Id, length(v_Rep_Server)+2); # v_Rep_URL := 'http://' || v_Host_Name || ':' || v_Port || '/reports/rwservlet/getjobid' || v_Job_Id || '?server=' || v_Rep_Server; # Message(v_Rep_URL); # Web.Show_Document(v_Rep_URL, '_blank'); # End If; # End If; # Else # Message('Error Running Report'); # End If; # reason: the guard reads the local V_REP_STATUS, which is written from something CRL has no expression for: a Forms built-in, a database call or a shape the reader refuses
7 clauses converted, 15 statements refused
PROCEDURE Load_EmpExp_And_PaySlip IS
Cursor C1 Is Select Expd_Id,Expd_Emp_Code,Emp_Name,Exph_Comp_Code,Exph_Divn_Code,Exph_Dept_Code,Expd_Comp_Code,
Expd_Divn_Code,Expd_Dept_Code,Expd_Main_Acnt_Code,Expd_Curr_Code,Expd_Lc_Amt,Emp_Anly_Code,Expd_Exp_Dt,Expd_Iss_Dt,
Expd_Doc_No,Expd_Doc_Type_Code,Expd_Allowance_Code,Allowance_Name
From T_Emp_Exp_Head,T_Emp_Exp_Detail,M_Employee, M_Allowance
Where Expd_Exph_Id =Exph_Id
And Expd_Emp_Code =Emp_Code
And Allowance_Code=Expd_Allowance_Code
And Exph_Comp_Code =:Global.Company
And Exph_Divn_Code =:Ref_Divn
-- And Exph_Ayr_Code =Fn_Get_Ayr_Code(:Global.Company, 'C')
And Exph_Pay_Trans_Code =:Ref_Txn
And Exph_No = :Ref_No
And Expd_Comp_Code =:Ref_Comp
And Expd_Pay_Mode ='V'
And Nvl(Expd_Fin_Status,'N') ='N';
Cursor Curpayslip Is Select Paysliph_Id,Paysliph_Emp_Code,Emp_Short_Name,Emp_Anly_Code,Paysliph_Divn_Code,Paysliph_Dept_Code,Paysliph_Pay_Type,
Emp_Comp_Code,Emp_Divn_Code,Emp_Dept_Code,Payslipc_Main_Acnt_Code,Payslipd_Id,Payslipd_Curr_Code,Payslipd_Lc_Amt,Payslipd_Fc_Amt,Payslipd_Desc
From T_Payslip_Head,T_Payslip_Detail,M_Employee,M_Payslip_Company
Where Payslipd_Paysliph_Id =Paysliph_Id
And Emp_Code(+) = Paysliph_Pay_To
And Payslipc_Payslip_Code = Payslipd_Payslip_Code
And Payslipc_Comp_Code =:Global.Company
And Paysliph_Comp_Code =:Global.Company
And Paysliph_Divn_Code =:Ref_Divn
-- And Paysliph_Ayr_Code =Fn_Get_Ayr_Code(:Global.Company, 'C')
And Paysliph_Txn_Code =:Ref_Txn
And Paysliph_No = :Ref_No
And Payslipd_Td_Id is Null
And Nvl(Paysliph_Fin_Status,'N') ='N';
V_Count Number;
V_Count1 Number;
V_Cnt Number;
V_Divn_Code Varchar2(10);
V_Dept_Code Varchar2(10);
V_Anly_Code Varchar2(10);
V_Count3 Number;--TO DELETE
V_Txn_Flag Varchar2(10);
V_Txn_Type Varchar2(10);
V_Main_Account Varchar2(10);
Begin
:Global.Load_Flag :='Y';
Select Count(*) Into V_Count From M_Final_Txn Where Final_Txn_Code = :Ref_Txn;
If V_Count = 0 Then
Go_Block('T_Draft_Voucher_Detail');
Last_Record;
IF :System.Last_Record = 'TRUE' THEN
Last_Record;
Next_Record;
ELSE
First_Record;
END IF;
For Cur In C1 Loop
EXIT WHEN C1%Notfound;
If Cur.Expd_Iss_Dt Is Not Null And Cur.Expd_Exp_Dt Is Null Then
Show_Message('Alert1', 'Error,Document expiry not updated');
Raise Form_Trigger_Failure;
End If;
/*Select Count(*) Into V_Count1 --Commented due to employee document expiry date is updating while saving EEV, Before it was finance transfer time
From M_Emp_Documents
Where Doc_No = Cur.Expd_Doc_No
And Doc_Emp_Code =Cur.Expd_Emp_Code
And Doc_Type_Code=Cur.Expd_Doc_Type_Code
And Doc_Exp_Dt =Cur.Expd_Exp_Dt;
If V_Count1 > 0 Then
Show_Message('Alert1', 'Error,Document expiry already updated');
Raise Form_Trigger_Failure;
End If;*/
If Cur.Expd_Comp_Code = :Global.Company Then
V_Divn_Code := Cur.Expd_Divn_Code;
V_Dept_Code := Cur.Expd_Dept_Code;
V_Anly_Code := Cur.Emp_Anly_Code;
Else
V_Divn_Code := Cur.Exph_Divn_Code;
V_Dept_Code := Cur.Exph_Dept_Code;
V_Anly_Code := Null;
End If;
If Cur.Emp_Anly_Code Is Not Null Then
Select Count(*) Into V_Count From M_Analysis Where Anly_Code =Cur.Emp_Anly_Code;
If Nvl(V_Count,0)= 0 Then
Insert Into M_Analysis(Anly_Code,Anly_Name,Anly_Short_Name,Anly_Cr_User,Anly_Cr_Dt)
Select Emp_Anly_Code,Substr(Emp_Name,1,40),Substr(Emp_Short_Name,1,20),:Global.User,Sysdate From M_Employee
Where Emp_Anly_Code =Cur.Emp_Anly_Code And Emp_Status_Code in (1,2,3,4);
Select Count(*) Into V_Cnt From M_Analysis_Company Where Acomp_Anly_Code =Cur.Emp_Anly_Code
And Acomp_Comp_Code =:Global.Company;
If Nvl(V_Cnt,0) =0 Then
Insert Into M_Analysis_Company(Acomp_Comp_Code,Acomp_Anly_Code,Acomp_Cr_User,Acomp_Cr_Dt)
Values (:Global.Company,Cur.Emp_Anly_Code,:Global.User,Sysdate);
End If;
Else
Select Count(*) Into V_Cnt From M_Analysis_Company Where Acomp_Anly_Code =Cur.Emp_Anly_Code
And Acomp_Comp_Code =:Global.Company;
If Nvl(V_Cnt,0) =0 Then
Insert Into M_Analysis_Company(Acomp_Comp_Code,Acomp_Anly_Code,Acomp_Cr_User,Acomp_Cr_Dt)
Values (:Global.Company,Cur.Emp_Anly_Code,:Global.User,Sysdate);
End If;
End If;
End If;
:Load_Flag := 'Loaded';
If Cur.Expd_Comp_Code = :Global.Company Then
:Dvd_Main_Acnt_Code :=Cur.Expd_Main_Acnt_Code;
Else
v_Cnt :=0;
Select count(*) into v_Cnt From
M_Emp_Exp_Link, M_Allowance
Where Link_Allow_Code = Cur.Expd_Allowance_Code
And Allowance_Code = Cur.Expd_Allowance_Code
And Link_Comp_Code = :Ref_Comp
And Link_Divn_Code = Cur.Expd_Divn_Code;
If v_Cnt>0 Then
Select Distinct Link_Main_Acnt_Code Into V_Main_Account From M_Emp_Exp_Link, M_Allowance
Where Link_Allow_Code = Cur.Expd_Allowance_Code
And Allowance_Code = Cur.Expd_Allowance_Code
And Link_Comp_Code = :Ref_Comp
And Link_Divn_Code = Cur.Expd_Divn_Code;
Else
Show_Message('Alert1', 'Main account-Expense link not defined for this company. Allowance Code : '||Cur.Expd_Allowance_Code);
Raise Form_Trigger_Failure;
End If;
:Dvd_Main_Acnt_Code :=V_Main_Account;
End If;
:Dvd_Anly_Code_1 := V_Anly_Code;
:Dvd_Divn_Code := V_Divn_Code;
:Dvd_Dept_Code := V_Dept_Code;
:Dvd_Curr_Code := Cur.Expd_Curr_Code;
:Dvd_Fc_Amt := Cur.Expd_Lc_Amt;
:Dvd_Lc_Amt := Cur.Expd_Lc_Amt;
:Dvd_Seq_No := To_Number( :System.Cursor_Record);
:Dvd_Doc_Drcr_Flag := 'D';
:Dvd_Desc := Cur.Allowance_Name;
:Doc_Id := Cur.Expd_Id;
:Ref_Doc_Txn := :Ref_Txn;
Next_Record;
End Loop;
Else
Select Final_Txn_Flag Into V_Txn_Flag From M_Final_Txn Where Final_Txn_Code =:Ref_Txn;
If V_Txn_Flag ='PAYSLIP' Then
Go_Block('T_Draft_Voucher_Detail');
Last_Record;
IF :System.Last_Record = 'TRUE' THEN
Last_Record;
Next_Record;
ELSE
First_Record;
END IF;
For Cur In Curpayslip Loop
EXIT WHEN Curpayslip%Notfound;
If Cur.Emp_Comp_Code = :Global.Company Then
V_Divn_Code := Cur.Emp_Divn_Code;
V_Dept_Code := Cur.Emp_Dept_Code;
V_Anly_Code := Cur.Emp_Anly_Code;
Else
V_Divn_Code := Cur.Paysliph_Divn_Code;
V_Dept_Code := Cur.Paysliph_Dept_Code;
V_Anly_Code := Null;
End If;
If Cur.Emp_Anly_Code Is Not Null Then
Select Count(*) Into V_Count From M_Analysis Where Anly_Code =Cur.Emp_Anly_Code;
If Nvl(V_Count,0)= 0 Then
Insert Into M_Analysis(Anly_Code,Anly_Name,Anly_Short_Name,Anly_Cr_User,Anly_Cr_Dt)
Select Emp_Anly_Code,Substr(Emp_Name,1,40),Substr(Emp_Short_Name,1,20),:Global.User,Sysdate From M_Employee
Where Emp_Anly_Code =Cur.Emp_Anly_Code And Emp_Status_Code in (1,2,3,4);
Select Count(*) Into V_Cnt From M_Analysis_Company Where Acomp_Anly_Code =Cur.Emp_Anly_Code
And Acomp_Comp_Code =:Global.Company;
If Nvl(V_Cnt,0) =0 Then
Insert Into M_Analysis_Company(Acomp_Comp_Code,Acomp_Anly_Code,Acomp_Cr_User,Acomp_Cr_Dt)
Values (:Global.Company,Cur.Emp_Anly_Code,:Global.User,Sysdate);
End If;
Else
Select Count(*) Into V_Cnt From M_Analysis_Company Where Acomp_Anly_Code =Cur.Emp_Anly_Code
And Acomp_Comp_Code =:Global.Company;
If Nvl(V_Cnt,0) =0 Then
Insert Into M_Analysis_Company(Acomp_Comp_Code,Acomp_Anly_Code,Acomp_Cr_User,Acomp_Cr_Dt)
Values (:Global.Company,Cur.Emp_Anly_Code,:Global.User,Sysdate);
End If;
End If;
End If;
:Load_Flag := 'Loaded';
:Dvd_Main_Acnt_Code := Cur.Payslipc_Main_Acnt_Code;
:Dvd_Anly_Code_1 := V_Anly_Code;
:Dvd_Divn_Code := V_Divn_Code;
:Dvd_Dept_Code := V_Dept_Code;
:Dvd_Curr_Code := Cur.Payslipd_Curr_Code;
:Dvd_Fc_Amt := Cur.Payslipd_Fc_Amt;
:Dvd_Lc_Amt := Cur.Payslipd_Lc_Amt;
:Dvd_Seq_No := To_Number( :System.Cursor_Record);
:Doc_Id := Cur.PayslipD_Id;
:Ref_Doc_Txn := :Ref_Txn;
If Cur.Paysliph_Pay_Type ='REC' Then
:Dvd_Doc_Drcr_Flag :='C';
Else
:Dvd_Doc_Drcr_Flag :='D';
End If;
:Dvd_Desc :=Cur.Payslipd_Desc;
--:Hd_Doc_Id :=Cur.Paysliph_Id;
Next_Record;
End Loop;
End If;
End If;
First_Record;
:Global.Load_Flag :='N';
End;on unit LOAD_EMPEXP_AND_PAYSLIP: from FINAL_TXN_COUNT(REF_TXN) # load-fmb-draft-voucher-load-empexp-and-payslip-unit-0 from FINAL_TXN(REF_TXN) when not (FINAL_TXN_COUNT.COUNT = 0) # load-fmb-draft-voucher-load-empexp-and-payslip-unit-1 set GLOBAL.LOAD_FLAG to 'Y' go to T_DRAFT_VOUCHER_DETAIL when FINAL_TXN_COUNT.COUNT = 0 last record of T_DRAFT_VOUCHER_DETAIL when FINAL_TXN_COUNT.COUNT = 0 last record when (FINAL_TXN_COUNT.COUNT = 0) and (SYSTEM.LAST_RECORD = 'TRUE') next record when (FINAL_TXN_COUNT.COUNT = 0) and (SYSTEM.LAST_RECORD = 'TRUE') first record when (FINAL_TXN_COUNT.COUNT = 0) and not (SYSTEM.LAST_RECORD = 'TRUE') go to T_DRAFT_VOUCHER_DETAIL when not (FINAL_TXN_COUNT.COUNT = 0) and (FINAL_TXN.FINAL_TXN_FLAG = 'PAYSLIP') last record of T_DRAFT_VOUCHER_DETAIL when not (FINAL_TXN_COUNT.COUNT = 0) and (FINAL_TXN.FINAL_TXN_FLAG = 'PAYSLIP') last record when (not (FINAL_TXN_COUNT.COUNT = 0) and (FINAL_TXN.FINAL_TXN_FLAG = 'PAYSLIP')) and (SYSTEM.LAST_RECORD = 'TRUE') next record when (not (FINAL_TXN_COUNT.COUNT = 0) and (FINAL_TXN.FINAL_TXN_FLAG = 'PAYSLIP')) and (SYSTEM.LAST_RECORD = 'TRUE') first record when (not (FINAL_TXN_COUNT.COUNT = 0) and (FINAL_TXN.FINAL_TXN_FLAG = 'PAYSLIP')) and not (SYSTEM.LAST_RECORD = 'TRUE') first record set GLOBAL.LOAD_FLAG to 'N' # 2 statements did not convert.# line 61 # For Cur In C1 Loop # EXIT WHEN C1%Notfound; # If Cur.Expd_Iss_Dt Is Not Null And Cur.Expd_Exp_Dt Is Null Then # Show_Message('Alert1', 'Error,Document expiry not updated'); # Raise Form_Trigger_Failure; # End If; # # # If Cur.Expd_Comp_Code = :Global.Company Then # V_Divn_Code := Cur.Expd_Divn_Code; # V_Dept_Code := Cur.Expd_Dept_Code; # V_Anly_Code := Cur.Emp_Anly_Code; # Else # V_Divn_Code := Cur.Exph_Divn_Code; # V_Dept_Code := Cur.Exph_Dept_Code; # V_Anly_Code := Null; # End If; # # If Cur.Emp_Anly_Code Is Not Null Then # Select Count(*) Into V_Count From M_Analysis Where Anly_Code =Cur.Emp_Anly_Code; # If Nvl(V_Count,0)= 0 Then # Insert Into M_Analysis(Anly_Code,Anly_Name,Anly_Short_Name,Anly_Cr_User,Anly_Cr_Dt) # Select Emp_Anly_Code,Substr(Emp_Name,1,40),Substr(Emp_Short_Name,1,20),:Global.User,Sysdate From M_Employee # Where Emp_Anly_Code =Cur.Emp_Anly_Code And Emp_Status_Code in (1,2,3,4); # # Select Count(*) Into V_Cnt From M_Analysis_Company Where Acomp_Anly_Code =Cur.Emp_Anly_Code # And Acomp_Comp_Code =:Global.Company; # If Nvl(V_Cnt,0) =0 Then # Insert Into M_Analysis_Company(Acomp_Comp_Code,Acomp_Anly_Code,Acomp_Cr_User,Acomp_Cr_Dt) # Values (:Global.Company,Cur.Emp_Anly_Code,:Global.User,Sysdate); # End If; # Else # Select Count(*) Into V_Cnt From M_Analysis_Company Where Acomp_Anly_Code =Cur.Emp_Anly_Code # And Acomp_Comp_Code =:Global.Company; # If Nvl(V_Cnt,0) =0 Then # Insert Into M_Analysis_Company(Acomp_Comp_Code,Acomp_Anly_Code,Acomp_Cr_User,Acomp_Cr_Dt) # Values (:Global.Company,Cur.Emp_Anly_Code,:Global.User,Sysdate); # End If; # End If; # End If; # # :Load_Flag := 'Loaded'; # If Cur.Expd_Comp_Code = :Global.Company Then # :Dvd_Main_Acnt_Code :=Cur.Expd_Main_Acnt_Code; # Else # v_Cnt :=0; # Select count(*) into v_Cnt From # M_Emp_Exp_Link, M_Allowance # Where Link_Allow_Code = Cur.Expd_Allowance_Code # And Allowance_Code = Cur.Expd_Allowance_Code # And Link_Comp_Code = :Ref_Comp # And Link_Divn_Code = Cur.Expd_Divn_Code; # # If v_Cnt>0 Then # Select Distinct Link_Main_Acnt_Code Into V_Main_Account From M_Emp_Exp_Link, M_Allowance # Where Link_Allow_Code = Cur.Expd_Allowance_Code # And Allowance_Code = Cur.Expd_Allowance_Code # And Link_Comp_Code = :Ref_Comp # And Link_Divn_Code = Cur.Expd_Divn_Code; # Else # Show_Message('Alert1', 'Main account-Expense link not defined for this company. Allowance Code : '||Cur.Expd_Allowance_Code); # Raise Form_Trigger_Failure; # End If; # # :Dvd_Main_Acnt_Code :=V_Main_Account; # # End If; # # :Dvd_Anly_Code_1 := V_Anly_Code; # :Dvd_Divn_Code := V_Divn_Code; # :Dvd_Dept_Code := V_Dept_Code; # :Dvd_Curr_Code := Cur.Expd_Curr_Code; # :Dvd_Fc_Amt := Cur.Expd_Lc_Amt; # :Dvd_Lc_Amt := Cur.Expd_Lc_Amt; # :Dvd_Seq_No := To_Number( :System.Cursor_Record); # :Dvd_Doc_Drcr_Flag := 'D'; # :Dvd_Desc := Cur.Allowance_Name; # :Doc_Id := Cur.Expd_Id; # :Ref_Doc_Txn := :Ref_Txn; # Next_Record; # # End Loop; # reason: it reads a row per iteration, and a per-row check source belongs to the for each: the clause carries a lookup this converter does not yet build (crl-loops.md operation 1)# line 164 # For Cur In Curpayslip Loop # EXIT WHEN Curpayslip%Notfound; # # If Cur.Emp_Comp_Code = :Global.Company Then # V_Divn_Code := Cur.Emp_Divn_Code; # V_Dept_Code := Cur.Emp_Dept_Code; # V_Anly_Code := Cur.Emp_Anly_Code; # Else # V_Divn_Code := Cur.Paysliph_Divn_Code; # V_Dept_Code := Cur.Paysliph_Dept_Code; # V_Anly_Code := Null; # End If; # # If Cur.Emp_Anly_Code Is Not Null Then # Select Count(*) Into V_Count From M_Analysis Where Anly_Code =Cur.Emp_Anly_Code; # If Nvl(V_Count,0)= 0 Then # Insert Into M_Analysis(Anly_Code,Anly_Name,Anly_Short_Name,Anly_Cr_User,Anly_Cr_Dt) # Select Emp_Anly_Code,Substr(Emp_Name,1,40),Substr(Emp_Short_Name,1,20),:Global.User,Sysdate From M_Employee # Where Emp_Anly_Code =Cur.Emp_Anly_Code And Emp_Status_Code in (1,2,3,4); # # Select Count(*) Into V_Cnt From M_Analysis_Company Where Acomp_Anly_Code =Cur.Emp_Anly_Code # And Acomp_Comp_Code =:Global.Company; # If Nvl(V_Cnt,0) =0 Then # Insert Into M_Analysis_Company(Acomp_Comp_Code,Acomp_Anly_Code,Acomp_Cr_User,Acomp_Cr_Dt) # Values (:Global.Company,Cur.Emp_Anly_Code,:Global.User,Sysdate); # End If; # Else # Select Count(*) Into V_Cnt From M_Analysis_Company Where Acomp_Anly_Code =Cur.Emp_Anly_Code # And Acomp_Comp_Code =:Global.Company; # If Nvl(V_Cnt,0) =0 Then # Insert Into M_Analysis_Company(Acomp_Comp_Code,Acomp_Anly_Code,Acomp_Cr_User,Acomp_Cr_Dt) # Values (:Global.Company,Cur.Emp_Anly_Code,:Global.User,Sysdate); # End If; # End If; # End If; # # :Load_Flag := 'Loaded'; # :Dvd_Main_Acnt_Code := Cur.Payslipc_Main_Acnt_Code; # :Dvd_Anly_Code_1 := V_Anly_Code; # :Dvd_Divn_Code := V_Divn_Code; # :Dvd_Dept_Code := V_Dept_Code; # :Dvd_Curr_Code := Cur.Payslipd_Curr_Code; # :Dvd_Fc_Amt := Cur.Payslipd_Fc_Amt; # :Dvd_Lc_Amt := Cur.Payslipd_Lc_Amt; # :Dvd_Seq_No := To_Number( :System.Cursor_Record); # :Doc_Id := Cur.PayslipD_Id; # :Ref_Doc_Txn := :Ref_Txn; # If Cur.Paysliph_Pay_Type ='REC' Then # :Dvd_Doc_Drcr_Flag :='C'; # Else # :Dvd_Doc_Drcr_Flag :='D'; # End If; # :Dvd_Desc :=Cur.Payslipd_Desc; # # Next_Record; # # End Loop; # reason: it reads a row per iteration, and a per-row check source belongs to the for each: the clause carries a lookup this converter does not yet build (crl-loops.md operation 1)
13 clauses converted, 2 statements refused