0% found this document useful (0 votes)
107 views39 pages

Uft Code

This document contains code for automating various processes within a cargo and logistics application. It includes setting up variables to store test data retrieved from an Excel file, including airway bill numbers, locations, flight details, etc. It then has logic to call different functions and methods based on the specified sub-module, to perform actions like reservations, AWB capture, manifesting, and more.

Uploaded by

Sharukh Sayed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
107 views39 pages

Uft Code

This document contains code for automating various processes within a cargo and logistics application. It includes setting up variables to store test data retrieved from an Excel file, including airway bill numbers, locations, flight details, etc. It then has logic to call different functions and methods based on the specified sub-module, to perform actions like reservations, AWB capture, manifesting, and more.

Uploaded by

Sharukh Sayed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 39

'*********************Changes to be made before runing the

script********************************************
'Excel-----> AWB's, FlightNumbers,
'Envirnment File------------------> parAppInstance-> 'qa1 qa1','qa2
qa2',parUserName,parPWD

'sImpSheet="C:\UAL\SkyChain_Rapid\TestData\CargoCDAndStorageFeesSingleLeg.xls"
'DataTable.Import sImpSheet
'''Launch Application
Call BC_LoginToSKYCHAIN()
'''Login to Application

Dim
l_recordNo,ObjADORecordSet1,l_intRecordcount,ObjADORecordSet3,NoScripts,gstrTestExe
StartTime,gstrTestExeEndTime,dExecutionDate,iExecutionTime

Call gfOnInitialize(Environment("TestName"))
'CargoRootFolder=InputBox("Enter Directory Name to download the TestCases From QC:
(ForEx: C:\):")
strCargoRootFilePath="C:\UAL\SkyChain_Rapid\TestData"
gstrTestExeStartTime = Now
Call
gfReadUpdateExcelRecordSet(strCargoRootFilePath&chr(92)&"CargoSkyChainTestData.xls"
,"TestData","Execute='Yes'",ObjADORecordSet1,False)
l_intRecordcount=ObjADORecordSet1.RecordCount
'Un-Comment the below functional for Reservation & Booking
Call BC_BookingAWB()
If l_intRecordcount <> 0 Then
For l_recordNo = 1 to l_intRecordcount
parExecute_SubModule =
UCASE(ObjADORecordSet1.Fields("Execute_SubModule").value)
parExecute_BackDatedExe =
UCASE(ObjADORecordSet1.Fields("BackDatedExe").value)
parExecute_BackDatedVal= ObjADORecordSet1.Fields("BackDatedVal").value
parText_Date_Val=ObjADORecordSet1.Fields("Text_Date_Val").value
parRoutingFlag = ObjADORecordSet1.Fields("RoutingFlag").value
parLocation = ObjADORecordSet1.Fields("CityCode").value
parPlaceName = ObjADORecordSet1.Fields("PlaceName").value
parAirwayBillCode = (ObjADORecordSet1.Fields("AirwayBillNumber").value)
'
parAirwayBillCode1=ObjADORecordSet1.Fields("Genarated_Airway_Bill").value
parCallerName = ObjADORecordSet1.Fields("CallerName").value
If IsNull(parCallerName) OR parCallerName = "" Then parCallerName =
"Automation"&"-"& Cstr(Day(Now)&"-"&MonthName(Month(Now),True) &"-"& Year(Now))
' parAccountID = (ObjADORecordSet1.Fields("AgentAccount").value)
parFlightNum = ObjADORecordSet1.Fields("FlightNum").value
parAccountID = ObjADORecordSet1.Fields("AgentAccount").value
' parAccount = ObjADORecordSet1.Fields("Agent").value
parFlightDate = ObjADORecordSet1.Fields("FlightDate").value
parPieces = ObjADORecordSet1.Fields("Pieces").value
parWeight = ObjADORecordSet1.Fields("Weight").value
parVol = ObjADORecordSet1.Fields("Volume").value
parCarrier = ObjADORecordSet1.Fields("Carrier").value
parSourceStation = ObjADORecordSet1.Fields("SourceStation").value
If parLocation = "ORD" Then parLocation = "CHI"
'''Call
funcGetCityNameAndCode(parSourceStation,parPlaceName,parLocation)
parDesStation = ObjADORecordSet1.Fields("DestStation").value
parManiFestDesc = ObjADORecordSet1.Fields("ManiFestDesc").value
parCommodityCode = ObjADORecordSet1.Fields("CommodityCode").value
parProductName = ObjADORecordSet1.Fields("ProductName").value
parChargeCode = ObjADORecordSet1.Fields("ChargeCode").value
parSHCCode = ObjADORecordSet1.Fields("SHCCode").value
parConsigneeAccID = ObjADORecordSet1.Fields("ConsigneeAccID").value
parAWBExecutionType =
(ObjADORecordSet1.Fields("AWBExecutionType").value)
parScreeningType = ObjADORecordSet1.Fields("ScreeningType").value
parPSN = ObjADORecordSet1.Fields("PSN").value
parDGExpPCs = ObjADORecordSet1.Fields("DGExpPCs").value
parDGExpQty = ObjADORecordSet1.Fields("DGExpQty").value
parPaymentOption = ObjADORecordSet1.Fields("PaymentOption").value
parCreditPartyAccount =
ObjADORecordSet1.Fields("CreditPartyAccount_Org").value
parAmount = ObjADORecordSet1.Fields("Amount").value
parCardType = "VISA"'ObjADORecordSet1.Fields("CardType").value
parAPCreditCardNum =
"444555566667777"'ObjADORecordSet1.Fields("APCreditCardNum").value
parAPCreditCardExpireMonth =
"11"'ObjADORecordSet1.Fields("APCreditCardExpireMonth").value
parAPCreditCardExpireYear =
"2019"'ObjADORecordSet1.Fields("APCreditCardExpireYear").value
parAPCCCounter =
(ObjADORecordSet1.Fields("OriginCollectCounter").value)
parAPMCOAccNum = ObjADORecordSet1.Fields("APMCOAccNum").value
parAPCostCentDetailsAmt =
ObjADORecordSet1.Fields("APCostCentDetailsAmt").value
parAPCostCentCode = ObjADORecordSet1.Fields("APCostCentCode").value
parAPCheqNum = "123456"'ObjADORecordSet1.Fields("APCheqNum").value
parAPCheqDate = Cstr(Day(Now)&"-"&MonthName(Month(Now),True) &"-"&
Year(Now))'ObjADORecordSet1.Fields("APCheqDate").value
parAPCheqBankName =
"ICICI"'ObjADORecordSet1.Fields("APCheqBankName").value
parHouseAWBDetails = ObjADORecordSet1.Fields("HouseAWBDetails").value
parULDDimensionsDetails =
ObjADORecordSet1.Fields("ULDDimensionsDetails").value
parDGSummaryMode = ObjADORecordSet1.Fields("DGSummaryMode").value
parLoadInType = ObjADORecordSet1.Fields("LoadInType").value
DollyNo = ObjADORecordSet1.Fields("DollyNo").value
parULDDetails = ObjADORecordSet1.Fields("ULDDetails").value
parMultiLeg=(ObjADORecordSet1.Fields("Multi_Leg").value)
parThirdParty = (ObjADORecordSet1.Fields("Third_Party").value)
ParNegDiscount = (ObjADORecordSet1.Fields("NegDiscount").value)
parPartialAdhoc = UCASE(ObjADORecordSet1.Fields("PartialAdhoc").value)
If Not(parSHCCode = "" or parSHCCode = EMPTY) Then
ParOtherChargesCode =
ObjADORecordSet1.Fields("Other_Charge_Code").value
ParRA_Applicable = ObjADORecordSet1.Fields("RA_Applicable").value
End If
ParTactIrr = ObjADORecordSet1.Fields("TactIrr").value
parRateClass = ObjADORecordSet1.Fields("RateClass").value
NoScripts =
gf_OpenRecordSet("TestData","Execute='Yes'",ObjADORecordSet3,False)
ObjADORecordSet3.Close

If (parExecute_SubModule = "RESERVATION" OR parExecute_SubModule = "AWB


CAPTURE" OR parExecute_SubModule = UCASE("Warehouse Acceptance") OR
parExecute_SubModule = UCASE("Manifest and Loading")OR parExecute_SubModule =
"DEPART AND ARRIVAL" OR parExecute_SubModule = "DELIVERY FLIGHT" or
parExecute_SubModule = "CARGO ARRIVAL NOTIFICATION" or parExecute_SubModule =
"ARRIVE DOCUMENTS" or parExecute_SubModule = "AWB FINALIZATION" OR
parExecute_SubModule = "POD CAPTURE")Then
' Call BC_ChangeCITYandSTATION(parLocation)
' Call BC1_AWB0001_RESandBOOKINGForm_LaunchScreenCode("RES0001")
' If
BC2_AWB0001_RESandBOOKINGForm_ValidationForAirWayBill_Latest(parAirwayBillCode)=Tru
e Then ''Yedu
' Call
BC3_AWB0001_RESandBOOKINGForm_CustomerSearch(parCityCode,parAccountID)
' If parRoutingFlag = "Routing" Thenb
' ' ###########Yedu################
' Call
BC6_AWB0001_RESandBookingForm_ManifestDetails(parManiFestDesc,parCommodityCode)
' Call
BC7_AWB0001_RESandBookingForm_ProductDetails(parCallerName,parProductName)
' Call
BC8_AWB0001_RESandBookingForm_ChargeCodeDetails(parChargeCode)
' Call BC3_AWB0001_RESandBookingForm_EndSCHValue(parSHCCode)
' Call
BC_AWB0001_RESandBOOKING_SHCandProduct(parSHCCode,parPSN,parDGExpPCs,parDGExpQty,pa
rDGSummaryMode)
' ' ##############################
' Call
BC4_AWB0001_RESandBookingForm_Routing_Latest(parFlightNum,parFlightDate,parPieces,p
arWeight,parVol,parSourceStation,parDesStation)
' ' Call
BC4_AWB0001_RESandBookingForm_Routing(parFlightNum,parFlightDate,parPieces,parWeigh
t,parVol,parSourceStation,parDesStation)
' Else
' Call
BC4_AWB0001_RESandBookingForm_AddItinerary(parAirwayBillCode)
' Call
BC6_AWB0001_RESandBookingForm_ManifestDetails(parManiFestDesc,parCommodityCode)
' Call
BC7_AWB0001_RESandBookingForm_ProductDetails(parCallerName,parProductName)
' Call
BC8_AWB0001_RESandBookingForm_ChargeCodeDetails(parChargeCode)
' Call BC3_AWB0001_RESandBookingForm_EndSCHValue(parSHCCode)
' Call
BC_AWB0001_RESandBOOKING_SHCandProduct(parSHCCode,parPSN,parDGExpPCs,parDGExpQty,pa
rDGSummaryMode,ParRA_Applicable)
' End If
' Call BC_AWB0001_ULD_Dimensions(parULDDimensionsDetails)
' Call
BC_AWB0001_EnterCustomerDetails(parCityCode,parAccountID,parDesStation,parConsignee
AccID,parThirdParty)' Reservations
' Call
gf_UpdateRecordsInDataSheet(ObjADORecordSet1,"Execution_Progress","JRN:"&parJRNNumb
er)
' If JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("Reservation Save Exceptions").JavaButton("Override / Request
for").Exist(2) Then
' JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("Reservation Save Exceptions").JavaButton("Override / Request
for").Click
'' Call gfReportExecutionStatus(micWarning,"Resevation
and save expetions")
' End If
' Call BC_Bkg_Sts_Change(parAirwayBillCode)
''Starttttttttttttttttttttttttttttttttttttttttttttttt
If (parExecute_SubModule = "AWB CAPTURE" OR parExecute_SubModule
= UCASE("Warehouse Acceptance") OR parExecute_SubModule = UCASE("Manifest and
Loading")OR parExecute_SubModule = "DEPART AND ARRIVAL" OR parExecute_SubModule =
"DELIVERY FLIGHT" or parExecute_SubModule = "CARGO ARRIVAL NOTIFICATION" or
parExecute_SubModule = "ARRIVE DOCUMENTS" or parExecute_SubModule = "AWB
FINALIZATION" OR parExecute_SubModule = "POD CAPTURE")Then
Call BC_ChangeCITYandSTATION(parLocation)
Call
BC1_AWB0001_RESandBOOKINGForm_LaunchScreenCode("AWB0001")
Call
BC_AWB0001_EnterAWBGeneralDetails(parAWBExecutionType,parPlaceName,parLocation)
Call
BC_AWB0001_EnterHandlingandRatingDetails(parScreeningType,parWeight,ParOtherCharges
Code,parRateClass)
If Ucase(ParTactIrr) = "YES" Then
parAmount = JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_ConstructRateLine").GetCellData(0,"Rate/Chg")
parCharge = Cint(parAmount)+2
value_Apply_NegDisco =
BC_AWB0001_EnterRate("","",parCharge)
End If
If Ucase(ParNegDiscount) = "YES" Then
parAmount = JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_ConstructRateLine").GetCellData(0,"Rate/Chg")
value_Apply_NegDisco =
BC_Apply_NegDisco(parLocation,parAirwayBillCode,parAmount,parText_Date_Val,ParNegDi
scount)
End If
If Ucase(parPartialAdhoc) = "APPROVED" or
Ucase(parPartialAdhoc) = "NOT APPROVED" Then
parIssueDate = Split(parText_Date_Val," ")
Call
BC_Apply_PartialDisco(parLocation,parAirwayBillCode,"2",parIssueDate(0),parPartialA
dhoc)
End If
Call BC_AWB0001_CAR_HandlingandRating_NavToShowCashiering()
Call
BC_AWB0001_CAR_HandlingandRating_ShowCashiering_CC_Cash_MCO_CostCent(parCreditParty
Account,parCardType,parAmount,parAPCreditCardNum,parAPCreditCardExpireMonth,parAPCr
editCardExpireYear,parAPCCCounter,parAPMCOAccNum,parAPCostCentDetailsAmt,parAPCostC
entCode,parAPCheqNum,parAPCheqDate,parAPCheqBankName)
Call
BC1_AWB0001_RESandBOOKINGForm_LaunchScreenCode("CSH0008")
' Call
BC_CSH0008_ISRClosure(parLocation,parFlightDate,parAPCCCounter)
Call
BC1_AWB0001_RESandBOOKINGForm_LaunchScreenCode("AWB0001")
Call BC_AWB0001_RetriveAWBDetails()
Call
BC_AWB0001_Validation_HouseAWB(parHouseAWBDetails,parSourceStation,parDesStation)'
AWB capture
parExecution_Status =
ObjADORecordSet1.Fields("Execution_Progress").value
Call
gf_UpdateRecordsInDataSheet(ObjADORecordSet1,"Execution_Progress",parExecution_Stat
us&" --> AWB capture")
End If
If (parExecute_SubModule = UCASE("Warehouse Acceptance") OR
parExecute_SubModule = UCASE("Manifest and Loading")OR parExecute_SubModule =
"DEPART AND ARRIVAL" OR parExecute_SubModule = "DELIVERY FLIGHT" or
parExecute_SubModule = "CARGO ARRIVAL NOTIFICATION" or parExecute_SubModule =
"ARRIVE DOCUMENTS" or parExecute_SubModule = "AWB FINALIZATION" OR
parExecute_SubModule = "POD CAPTURE")Then
Call BC_AWB0001_EnterWareHouseAcceptanceDetails()'Warehouse
Acceptance
' Call BC_AWB0001_CustomClearance_Origin(parSourceStation)
parExecution_Status =
ObjADORecordSet1.Fields("Execution_Progress").value
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTab("jTab_OpenScreenReport:").Select "Warehouse Acceptance"
' Ready_Value = JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("Total Pieces :").GetCellData("#0","Ready")
' If Ready_Value <> 1 Then
' JavaWindow("UnitedCargo-360(QA2) -
Home").JavaToolbar("JToolBar").Press "Edit"
' JavaWindow("UnitedCargo-360(QA2) -
Home").JavaButton("Amend AWB").Click
' JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTab("jTab_OpenScreenReport:").Select "Reservation & Booking"
' Weight_Value = JavaWindow("UnitedCargo-360(QA2) -
Home").JavaEdit("Wt.Vol - L.Vol :").GetROProperty("value")
' Wt_value = Cint(Weight_Value) + 50
' JavaWindow("UnitedCargo-360(QA2) -
Home").JavaEdit("Wt.Vol - L.Vol :").Set Wt_value
' JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("JAdvancedTable").SetCellData 0,1,Wt_value
' JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTab("jTab_OpenScreenReport:").Select "Handling & Rating"
' JavaWindow("UnitedCargo-360(QA2) -
Home").JavaButton("Construct RateLine").Click
' JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("Tact Construction").JavaButton("Calculate Freight Charge").Click
' Call
BC_AWB0001_EnterHandlingandRatingDetails(parScreeningType,Wt_value,ParOtherChargesC
ode,parRateClass)
' If Ucase(ParTactIrr) = "YES" Then
' parAmount = JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_ConstructRateLine").GetCellData(0,"Rate/Chg")
' parCharge = Cint(parAmount)+2
' value_Apply_NegDisco =
BC_AWB0001_EnterRate("","",parCharge)
' End If
' If Ucase(ParNegDiscount) = "YES" Then
' parAmount = JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_ConstructRateLine").GetCellData(0,"Rate/Chg")
' value_Apply_NegDisco =
BC_Apply_NegDisco(parLocation,parAirwayBillCode,parAmount,parText_Date_Val,ParNegDi
scount,parPartialAdhoc)
' End If
' Call
BC_AWB0001_CAR_HandlingandRating_NavToShowCashiering()
' Call
BC_AWB0001_CAR_HandlingandRating_ShowCashiering_CC_Cash_MCO_CostCent(parCreditParty
Account,parCardType,parAmount,parAPCreditCardNum,parAPCreditCardExpireMonth,parAPCr
editCardExpireYear,parAPCCCounter,parAPMCOAccNum,parAPCostCentDetailsAmt,parAPCostC
entCode,parAPCheqNum,parAPCheqDate,parAPCheqBankName)
' Call
BC1_AWB0001_RESandBOOKINGForm_LaunchScreenCode("CSH0008")
' Call
BC1_AWB0001_RESandBOOKINGForm_LaunchScreenCode("AWB0001")
' Call BC_AWB0001_RetriveAWBDetails()
' Call
BC_AWB0001_Validation_HouseAWB(parHouseAWBDetails,parSourceStation,parDesStation)'
AWB capture
' End If

JavaWindow("UnitedCargo-360(QA2) -
Home").JavaButton("jBtn_Close").Click
If JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_Conformation").Exist Then
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_Conformation").JavaButton("jBtn_Yes").Click
End If
Call
gf_UpdateRecordsInDataSheet(ObjADORecordSet1,"Execution_Progress",parExecution_Stat
us&" --> Warehouse Acceptance")
End If
' End If

'Enddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
End If
ObjADORecordSet1.MoveNext
Next
Call BC_NegDiscoVerification()
Else
ObjADORecordSet1.Close
Set ObjADORecordSet1 = Nothing
Call gfExitAction("No Records found in ADODBRecordset. Executing
ExitAction().....")
End If

ObjADORecordSet1.Close
'Set ObjADORecordSet1 = Nothing
ObjCon.Close
Set ObjCon = Nothing

'After warehouse acceptance process then below script will handle till POD capture
'Flight Depart
Dim
ObjADORecordSet2,l_intRecordcount2,iFlightCount,parArrLocation,parFlightArrDate,iNo
sFlightCount
Call
gfReadUpdateExcelRecordSet(strCargoRootFilePath&chr(92)&"CargoSkyChainTestData.xls"
,"Flight_Seq","",ObjADORecordSet2,False)

l_intRecordcount2=ObjADORecordSet2.RecordCount
If l_intRecordcount2 <> 0 Then
For l_recordNo = 1 to l_intRecordcount2

iNosFlightCount = 1
parFlightNum = ObjADORecordSet2.Fields("FlightNumber").value
parFlightDate = ObjADORecordSet2.Fields("FlightDeptDate").value
parFlightArrDate = ObjADORecordSet2.Fields("FlightArrtDate").value
Counter = FALSE
DLV_Value = TRUE
Call gf_OpenRecordSet("TestData","FlightNum='"& parFlightNum &"'And
FlightDate='"& parFlightDate &"' And Execute='Yes'",ObjADORecordSet1,False)
' Call gf_OpenRecordSet("TestData","FlightNum='"& parFlightNum &"'And
FlightDate='"& parFlightDate &"' And Execute='Yes' AND NegDiscountApplied <> 'NOT
APPLIED'",ObjADORecordSet1,False)
' Call gf_OpenRecordSet("TestData","FlightNum='"& parFlightNum &"'And
AirwayBillNumber="& parAirwayBillCode &" And FlightDate='"& parFlightDate &"'
",ObjADORecordSet1,False)
l_intRecordcount=ObjADORecordSet1.RecordCount
For iFlightCount = 1 To l_intRecordcount
parNegDiscount = ObjADORecordSet1.Fields("NegDiscount").value
If Ucase(parNegDiscount) = "NO" Then
parNegDiscountApplied = "NOT APPLIED"
parPartialAdhoc = "NOT APPROVED"
Else
parNegDiscountApplied =
ObjADORecordSet1.Fields("NegDiscountApplied").value
parPartialAdhoc =
UCASE(ObjADORecordSet1.Fields("PartialAdhoc").value)
End If
parExecute = ObjADORecordSet1.Fields("Execute").value
parAirwayBillCode =
(ObjADORecordSet1.Fields("AirwayBillNumber").value)
parSourceStation =
ObjADORecordSet1.Fields("PartSourceStation").value
parLocation = ObjADORecordSet1.Fields("CityCode").value
parDesStation = ObjADORecordSet1.Fields("PartDestStation").value
parArrLocation = parDesStation
If parArrLocation = "NRT" Then parArrLocation = "TYO"
If parArrLocation = "ORD" Then parArrLocation = "CHI"
If parArrLocation = "EWR" Then parArrLocation = "NYC"
If parArrLocation = "IAH" Then parArrLocation = "HOU"
If parArrLocation = "CGK" Then parArrLocation = "JKT"
If parArrLocation = "IAD" Then parArrLocation = "WAS"

parLoadInType = ObjADORecordSet1.Fields("LoadInType").value
parDollyNo = ObjADORecordSet1.Fields("DollyNo").value
parULDDetails = ObjADORecordSet1.Fields("ULDDetails").value
parAWBExecutionType =
(ObjADORecordSet1.Fields("AWBExecutionType").value)
parChargeCode = ObjADORecordSet1.Fields("ChargeCode").value
parExecution_Status =
ObjADORecordSet1.Fields("Execution_Progress").value
parExecute_SubModule =
UCASE(ObjADORecordSet1.Fields("Execute_SubModule").value)
parPaymentOption = ObjADORecordSet1.Fields("PaymentOption").value
parAmount = ObjADORecordSet1.Fields("Amount").value
parCardType = "VISA"'ObjADORecordSet1.Fields("CardType").value
parAPCreditCardNum =
"444555566667777"'ObjADORecordSet1.Fields("APCreditCardNum").value
bparAPCreditCardExpireMonth =
"11"'ObjADORecordSet1.Fields("APCreditCardExpireMonth").value
parAPCreditCardExpireYear =
"2019"'ObjADORecordSet1.Fields("APCreditCardExpireYear").value
parAPCCCounter =
(ObjADORecordSet1.Fields("OriginCollectCounter").value)
parDestCounter =
(ObjADORecordSet1.Fields("DestCollectCounter").value)
parAPMCOAccNum = ObjADORecordSet1.Fields("APMCOAccNum").value
parAPCostCentDetailsAmt =
ObjADORecordSet1.Fields("APCostCentDetailsAmt").value
parAPCostCentCode =
ObjADORecordSet1.Fields("APCostCentCode").value
parAPCheqNum =
"123456"'ObjADORecordSet1.Fields("APCheqNum").value
parAPCheqDate = Cstr(Day(Now)&"-"&MonthName(Month(Now),True)
&"-"& Year(Now))'ObjADORecordSet1.Fields("APCheqDate").value
parAPCheqBankName =
"ICICI"'ObjADORecordSet1.Fields("APCheqBankName").value
If (parExecute_SubModule = "DEPART AND ARRIVAL" OR
parExecute_SubModule = "DELIVERY FLIGHT" or parExecute_SubModule = "CARGO ARRIVAL
NOTIFICATION" or parExecute_SubModule = "ARRIVE DOCUMENTS" or parExecute_SubModule
= "AWB FINALIZATION" OR parExecute_SubModule = "POD CAPTURE")Then
Counter = True
If (parExecute_SubModule = "DELIVERY FLIGHT" or
parExecute_SubModule = "AWB FINALIZATION" OR parExecute_SubModule = "POD CAPTURE")
Then
DLV_Value = True
End If
End IF
Call BC_ChangeCITYandSTATION(parLocation)
If parNegDiscountApplied <> "NOT APPLIED" or
Ucase(parNegDiscount) = "NO" or parPartialAdhoc = "NOT APPROVED" Then
If (parExecute_SubModule = UCASE("Manifest and Loading")OR
parExecute_SubModule = "DEPART AND ARRIVAL" OR parExecute_SubModule = "DELIVERY
FLIGHT" or parExecute_SubModule = "CARGO ARRIVAL NOTIFICATION" or
parExecute_SubModule = "ARRIVE DOCUMENTS" or parExecute_SubModule = "AWB
FINALIZATION" OR parExecute_SubModule = "POD CAPTURE")Then
If iNosFlightCount = 1 Then
iNosFlightCount = iNosFlightCount+1
Call
BC1_AWB0001_RESandBOOKINGForm_LaunchScreenCode("EXP0001")
Call
BC_EXP0001_FlightDepart_SearchFlight(parFlightNum,parFlightDate,parSourceStation,pa
rDesStation)
End If
Call
BC3_EXP0001_FlightDepart_GenerateManifest(parLoadInType,parDollyNo,parULDDetails)
Call
gf_UpdateRecordsInDataSheet(ObjADORecordSet1,"Execution_Progress",parExecution_Stat
us&" --> Flight Departed")
End If
ObjADORecordSet1.MoveNext
End If
Next
If iNosFlightCount > 1 Then
If Counter Then
Call BC3_EXP0001_FlightDepart_FinalizeManifest()
Call
BC_EXP0001_SelFlightDepart(parFlightNum,parFlightDate,parSourceStation,parDesStatio
n)
Call BC_ChangeCITYandSTATION(parArrLocation)
Call
BC1_AWB0001_RESandBOOKINGForm_LaunchScreenCode("IMP0002")
Call
BC_IMP0002_ValidateFlightArrivalStatus(parFlightNum,parFlightArrDate)
Call BC_IMP0003_LocateShippment()
Call
gf_UpdateRecordsInDataSheet(ObjADORecordSet2,"Execution_Progress",parExecution_Stat
us&" --> Flight Arrival & Located/AWR/NFD")
End If

If DLV_Value Then
Call BC_ChangeCITYandSTATION(parArrLocation)
Call
BC_AWB0001_Finilize_ShipVerify(parFlightNum,parFlightDate)
End If

End if

ObjADORecordSet2.MoveNext
ObjADORecordSet1.Close
Set ObjADORecordSet1 = Nothing
Next
Else
ObjADORecordSet2.Close
Set ObjADORecordSet2 = Nothing
Call gfExitAction("No Records found in ADODBRecordset. Executing
ExitAction().....")
End If

ObjADORecordSet2.Close
Set ObjADORecordSet2 = Nothing
ObjCon.Close

Set ObjCon = Nothing

gstrTestExeEndTime=Now
dExecutionDate = Now
iExecutionTime =
DateDiff("n",CDate(gstrTestExeStartTime),CDate(gstrTestExeEndTime))

Call
PostExecutionDataToDatabase(Environment.Value("PortFolio"),Environment.Value("PPMCo
de"),Environment.Value("ApplicationName"),Cstr(NoScripts),dExecutionDate,iExecution
Time)
Call QuitSkyChainApplication()

Function
BC4_AWB0001_RESandBookingForm_Routing_Latest(parFlightNum,parFlightDate,parPieces,p
arWeight,parVol,parSourceStation,parDesStation)
'------------- Variable Declaration ---------------
Dim intRowCount,i,intFltNumber,strBrdPt,strOffPt
Dim strDeptDate,strArrDate,strAvlWgt,strAvlVol
Dim strSysDate,blnFlightAvailability,arrWeight,arrVol
'--------------------------------------------------
gstrStepName = "Add Flight through Routing "
If blnTestExecutionStatus Then
blnTestExecutionStatus = False
blnFlightAvailability=False

arrWeight = Split(parWeight,";")
arrVol = Split(parVol,";")
JavaWindow("UnitedCargo-360(QA2) - Home").JavaEdit("jEdit_Pieces").Set
parPieces
JavaWindow("UnitedCargo-360(QA2) - Home").JavaEdit("jEdit_Weight").Set
arrWeight(0)
JavaWindow("UnitedCargo-360(QA2) - Home").JavaList("jListWtVol").Select
arrWeight(1)
JavaWindow("UnitedCargo-360(QA2) - Home").JavaEdit("jEdit_Vol").Set
arrVol(0)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaList("jListLength").Select arrVol(1)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaEdit("jEdit_SourceStation").Set parSourceStation
Wait(3)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaEdit("jEdit_DestStation").Set parDesStation
Wait(3)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaButton("jBtn_Routing").Click
Set objWaitElement=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("Route Generation")
Call WaitToEnable(objWaitElement,Environment.Value("gparWaitTime"))
gstrStepName = "jDialog_RoutingDetails Validation"
Wait 5
If JavaWindow("UnitedCargo-360(QA2) - Home").JavaDialog("Route
Generation").Exist(10) Then
Call gfReportExecutionStatus(micPass,"jDialog_RoutingDetails
Dialog is launched Successfully")
blnTestExecutionStatus = True
Wait 5
JavaWindow("UnitedCargo-360(QA2) - Home").JavaDialog("Route
Generation").JavaEdit("Max. No. of stops :").Set "0"
JavaWindow("UnitedCargo-360(QA2) - Home").JavaDialog("Route
Generation").JavaButton("jBtn_SD_Search").Click
Wait(2)
intRowCount=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("Route
Generation").JavaTable("JGroupedTable").GetROProperty("rows")
For i = 1 To intRowCount-1
blnStatus=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("Route Generation").JavaTable("JGroupedTable").GetCellData(i,2)
If blnStatus="UA" Then
intFltNumber=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("Route Generation").JavaTable("JGroupedTable").GetCellData(i,3)

strBrdPt=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("Route Generation").JavaTable("JGroupedTable").GetCellData(i,5)
strOffPt=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("Route Generation").JavaTable("JGroupedTable").GetCellData(i,6)
strDeptDate=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("Route Generation").JavaTable("JGroupedTable").GetCellData(i,9)
strArrDate=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("Route Generation").JavaTable("JGroupedTable").GetCellData(i,10)
strAvlWgt=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("Route Generation").JavaTable("JGroupedTable").GetCellData(i,12)
strAvlVol=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("Route Generation").JavaTable("JGroupedTable").GetCellData(i,13)
'Adding run time properties to Dictionary Object
oDiscSigSegFlightDetails.RemoveAll
oDiscSigSegFlightDetails.Add 1,intFltNumber
oDiscSigSegFlightDetails.Add 2,strBrdPt
oDiscSigSegFlightDetails.Add 3,strOffPt
oDiscSigSegFlightDetails.Add 4,strDeptDate
oDiscSigSegFlightDetails.Add 5,strArrDate
oDiscSigSegFlightDetails.Add 6,strAvlWgt
oDiscSigSegFlightDetails.Add 7,strAvlVol
'Validating Flight Avaliable Weight and Avaliable
Volume
' If
(oDiscSigSegFlightDetails.Item(1)=cInt(parFlightNum)) and
(lcase(oDiscSigSegFlightDetails.Item(4))=lcase(parFlightDate)) and
((oDiscSigSegFlightDetails.Item(6)) >= cInt(arrWeight(0))) and
((oDiscSigSegFlightDetails.Item(7)) >= cInt(arrVol(0))) Then
If JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("Route Generation").JavaTable("JGroupedTable").Exist(10) Then
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("Route Generation").JavaTable("JGroupedTable").SelectRow i
wait(3)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("Route Generation").JavaButton("Submit").Click

Wait(3)
Call gfReportExecutionStatus(micPass,"Flight
selection is Successful")
blnTestExecutionStatus = True
blnFlightAvailability=True
Exit For
End If
End If
Next
End If
End If

If JavaWindow("UnitedCargo-360(QA2) - Home").JavaDialog("Route
Generation").Exist(10) Then
JavaWindow("UnitedCargo-360(QA2) - Home").JavaDialog("Route
Generation").Close
End If
' If blnFlightAvailability=False Then
' JavaWindow("UnitedCargo-360(QA2) - Home").JavaDialog("Route
Generation").JavaButton("jBtn_Routing_Cancel").Click
' wait(2)
' 'Call QuitSkyChainApplication()
' 'ScreenShot()
' blnTestExecutionStatus = False
' Call gfReportExecutionStatus(micFail,"The provided flight
number is not available at Routing, try with correct flight number")
' Else
' gstrStepName = "Step VI- Validation Flight Details getting
Routing"
' blnTestExecutionStatus = True
' Call gfReportExecutionStatus(micPass,"Step VI- The Flight
Details are ::"&vbcrlf&" Flight Number is --->
"&oDiscSigSegFlightDetails.Item(1)&vbcrlf&"Board Point --->
"&oDiscSigSegFlightDetails.Item(2)&vbcrlf&"Offered Point --->
"&oDiscSigSegFlightDetails.Item(3)&vbcrlf&"Flight Depart Date --->
"&oDiscSigSegFlightDetails.Item(4)&vbcrlf&"Flight Arrival Date --->
"&oDiscSigSegFlightDetails.Item(5)&vbcrlf&"Flight Available Weight --->
"&oDiscSigSegFlightDetails.Item(6)&vbcrlf&"Flight Available Volume --->
"&oDiscSigSegFlightDetails.Item(7) )
' End if
' Else
' Call gfReportExecutionStatus(micFail,"jDialog_RoutingDetails
Dialog is not launched")
' blnTestExecutionStatus = False
' End If
' End If
End Function

Function BC_NegDiscoVerification()
Dim ObjADORecordSet2
'------------- Variable Declaration ---------------
Call gf_OpenRecordSet("TestData","Execute='Yes' AND (NegDiscount = 'Yes' or
NegDiscount = 'YES'or TactIrr = 'Yes' or TactIrr = 'YES')",ObjADORecordSet2,False)
l_intRecordcount=ObjADORecordSet2.RecordCount
parLogin = False
For i = 1 To l_intRecordcount
parAirwayBillCode =
ObjADORecordSet2.Fields("AirwayBillNumber").value
parLocation = ObjADORecordSet2.Fields("CityCode").value
parIssueDate = ObjADORecordSet2.Fields("Text_Date_Val").value
parNegDiscount = ObjADORecordSet2.Fields("NegDiscount").value
parTactIrr = ObjADORecordSet2.Fields("TactIrr").value
parSource = ObjADORecordSet2.Fields("Source").value
If Not(parLogin) Then
If Instr(1,Environment.Value("parAppInstance"),"qa1") > 0
Then
Call BC_LoginToSKYCHAIN1("FAAUDITOR","qa1")
ElseIf Instr(1,Environment.Value("parAppInstance"),"qa2") >
0 Then
Call BC_LoginToSKYCHAIN1("FAAUDITOR","qa2")
ElseIf Instr(1,Environment.Value("parAppInstance"),"qa3") >
0 Then
Call BC_LoginToSKYCHAIN1("FAAUDITOR","qa3")
End If
parLogin = TRUE
End If
Call BC1_AWB0001_RESandBOOKINGForm_LaunchScreenCode("AWB0008")
wait 5
JavaWindow("UnitedCargo-360(QA2) - Home").JavaList("jList_Issue
Place").Select "City"
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaEdit("JEdit_IssueCity").Set parLocation
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaEdit("jEdit_IssueStartPeriod").Set parIssueDate
IssueendDate_Value = Cdate(parIssueDate)+1
IssueEndDate = Split(IssueendDate_Value,"/")
IssueendDate_Value =
IssueEndDate(1)&"-"&MonthName(IssueEndDate(0),True)&"-"&IssueEndDate(2)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaEdit("jEdit_IssueEndPeriod").Set IssueendDate_Value
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaEdit("jEditAWB_ShortNo").Set "016"
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaEdit("jEditAWB_MainNo").Set parAirwayBillCode
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaButton("Search_Network").Click
wait 5
Rows_Value = JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("JV Code:").GetROProperty("rows")
For j = 0 To 5
If Rows_Value > 0 Then
Exit For
Else
Wait 2
End If
Next
If Rows_Value > 0 Then
If Ucase(parNegDiscount) = "YES" Then
NegDisco_Value = JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("JV Code:").GetCellData(0,"Neg.Desc.Ind")
If NegDisco_Value = 1 Then

ObjADORecordSet2.Fields("NegDiscountApplied").value = "APPLIED"
Else

ObjADORecordSet2.Fields("NegDiscountApplied").value = "NOT APPLIED"


End If
End If
If Ucase(parTactIrr) = "YES" Then
Tact_Value = JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("JV Code:").GetCellData(0,"Tact.")
If Tact_Value = 1 Then
ObjADORecordSet2.Fields("TactApplied").value =
"APPLIED"
Else
ObjADORecordSet2.Fields("TactApplied").value =
"NOT APPLIED"
End If
End If
If Ucase(parSource) = "YES" Then
Source_Value = JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("JV Code:").GetCellData(0,"Source")
If Source_Value = 1 Then
ObjADORecordSet2.Fields("TactApplied").value =
"APPLIED"
Else
ObjADORecordSet2.Fields("TactApplied").value =
"NOT APPLIED"
End If
End If
End If
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaButton("jBtn_Close").Click
ObjADORecordSet2.MoveNext
Next
ObjADORecordSet2.Close
Set ObjADORecordSet2 = Nothing
If parLogin Then
Call BC_LoginToSKYCHAIN()
Call BC_ChangeCITYandSTATION(parLocation)
End If
End Function

Function BC_BookingAWB()
Call
gfReadUpdateExcelRecordSet(strCargoRootFilePath&chr(92)&"CargoSkyChainTestData.xls"
,"TestData","Execute='Yes'",ObjADORecordSet2,False)
l_intRecordcount1=ObjADORecordSet2.RecordCount
If l_intRecordcount1 <> 0 Then
For l_recordNo = 1 to l_intRecordcount1
parExecute_SubModule =
UCASE(ObjADORecordSet2.Fields("Execute_SubModule").value)
parExecute_BackDatedExe =
UCASE(ObjADORecordSet1.Fields("BackDatedExe").value)
parExecute_BackDatedVal= ObjADORecordSet1.Fields("BackDatedVal").value
parText_Date_Val=ObjADORecordSet1.Fields("Text_Date_Val").value
parRoutingFlag = ObjADORecordSet2.Fields("RoutingFlag").value
parLocation = ObjADORecordSet2.Fields("CityCode").value
parPlaceName = ObjADORecordSet2.Fields("PlaceName").value
parAirwayBillCode = (ObjADORecordSet2.Fields("AirwayBillNumber").value)
parCallerName = ObjADORecordSet2.Fields("CallerName").value
If IsNull(parCallerName) OR parCallerName = "" Then parCallerName =
"Automation"&"-"& Cstr(Day(Now)&"-"&MonthName(Month(Now),True) &"-"& Year(Now))
parFlightNum = ObjADORecordSet2.Fields("FlightNum").value
parAccountID = ObjADORecordSet2.Fields("AgentAccount").value
parFlightDate = ObjADORecordSet2.Fields("FlightDate").value
parPieces = ObjADORecordSet2.Fields("Pieces").value
parWeight = ObjADORecordSet2.Fields("Weight").value
parVol = ObjADORecordSet2.Fields("Volume").value
parCarrier = ObjADORecordSet2.Fields("Carrier").value
parSourceStation = ObjADORecordSet2.Fields("SourceStation").value
If parLocation = "ORD" Then parLocation = "CHI"
parDesStation = ObjADORecordSet2.Fields("DestStation").value
parManiFestDesc = ObjADORecordSet2.Fields("ManiFestDesc").value
parCommodityCode = ObjADORecordSet2.Fields("CommodityCode").value
parProductName = ObjADORecordSet2.Fields("ProductName").value
parChargeCode = ObjADORecordSet2.Fields("ChargeCode").value
parSHCCode = ObjADORecordSet2.Fields("SHCCode").value
parPSN = ObjADORecordSet2.Fields("PSN").value
parDGExpPCs = ObjADORecordSet2.Fields("DGExpPCs").value
If parDGExpPCs = "" or parDGExpPCs = EMPTY Then
parDGExpPCs = parPieces
End If
parDGExpQty = ObjADORecordSet2.Fields("DGExpQty").value
If parDGExpQty = "" or parDGExpQty = EMPTY Then
parDGExpQty1 = Split(parWeight,";")
parDGExpQty = parDGExpQty1(0)
End If
parHouseAWBDetails = ObjADORecordSet2.Fields("HouseAWBDetails").value
parULDDimensionsDetails =
ObjADORecordSet2.Fields("ULDDimensionsDetails").value
parDGSummaryMode = ObjADORecordSet2.Fields("DGSummaryMode").value
'parMultiLeg=(ObjADORecordSet2.Fields("Multi_Leg").value)
parConsigneeAccID = (ObjADORecordSet2.Fields("ConsigneeAccID").value)
If (parExecute_SubModule = "RESERVATION" OR parExecute_SubModule =
"AWB CAPTURE" OR parExecute_SubModule = UCASE("Warehouse Acceptance") OR
parExecute_SubModule = UCASE("Manifest and Loading")OR parExecute_SubModule =
"DEPART AND ARRIVAL" OR parExecute_SubModule = "DELIVERY FLIGHT" or
parExecute_SubModule = "CARGO ARRIVAL NOTIFICATION" or parExecute_SubModule =
"ARRIVE DOCUMENTS" or parExecute_SubModule = "AWB FINALIZATION" OR
parExecute_SubModule = "POD CAPTURE")Then
Call BC_ChangeCITYandSTATION(parLocation)
Call BC1_AWB0001_RESandBOOKINGForm_LaunchScreenCode("RES0001")
If
BC2_AWB0001_RESandBOOKINGForm_ValidationForAirWayBill_Latest(parAirwayBillCode)=Tru
e Then ''Yedu
Call
BC3_AWB0001_RESandBOOKINGForm_CustomerSearch(parCityCode,parAccountID)
If parRoutingFlag = "Routing" Then
' ###########Yedu################
Call
BC6_AWB0001_RESandBookingForm_ManifestDetails(parManiFestDesc,parCommodityCode)
Call
BC7_AWB0001_RESandBookingForm_ProductDetails(parCallerName,parProductName)
Call
BC8_AWB0001_RESandBookingForm_ChargeCodeDetails(parChargeCode)
Call
BC3_AWB0001_RESandBookingForm_EndSCHValue(parSHCCode)
Call
BC_AWB0001_RESandBOOKING_SHCandProduct(parSHCCode,parPSN,parDGExpPCs,parDGExpQty,pa
rDGSummaryMode)
' ##############################
Call
BC4_AWB0001_RESandBookingForm_Routing_Latest(parFlightNum,parFlightDate,parPieces,p
arWeight,parVol,parSourceStation,parDesStation)
Else
Call
BC4_AWB0001_RESandBookingForm_AddItinerary(parAirwayBillCode)
Call
BC6_AWB0001_RESandBookingForm_ManifestDetails(parManiFestDesc,parCommodityCode)
Call
BC7_AWB0001_RESandBookingForm_ProductDetails(parCallerName,parProductName)
Call
BC8_AWB0001_RESandBookingForm_ChargeCodeDetails(parChargeCode)
Call
BC3_AWB0001_RESandBookingForm_EndSCHValue(parSHCCode)
If parProductName = "PET" Then
call BC_SHC_PET_Value("N",PNR_No,MP_No)
End If
Call
BC_AWB0001_RESandBOOKING_SHCandProduct(parSHCCode,parPSN,parDGExpPCs,parDGExpQty,pa
rDGSummaryMode,ParRA_Applicable)
End If
Call
BC_AWB0001_ULD_Dimensions(parULDDimensionsDetails)
Call
BC_AWB0001_EnterCustomerDetails(parCityCode,parAccountID,parDesStation,parConsignee
AccID,parThirdParty)' Reservations
Call
gf_UpdateRecordsInDataSheet(ObjADORecordSet2,"Execution_Progress","JRN:"&parJRNNumb
er)
If JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("Reservation Save Exceptions").JavaButton("Override / Request
for").Exist(2) Then
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("Reservation Save Exceptions").JavaButton("Override / Request
for").Click
End If
End If
End IF
ObjADORecordSet2.MoveNext
Next
ObjADORecordSet2.Close
Set ObjADORecordSet2 = Nothing
End IF
End Function
Function BC_AWBCapture()
Call
gfReadUpdateExcelRecordSet(strCargoRootFilePath&chr(92)&"CargoSkyChainTestData.xls"
,"TestData","Execute='Yes'",ObjADORecordSet2,False)
l_intRecordcount=ObjADORecordSet2.RecordCount
If l_intRecordcount <> 0 Then
For l_recordNo = 1 to l_intRecordcount
parExecute_SubModule =
UCASE(ObjADORecordSet2.Fields("Execute_SubModule").value)
parExecute_BackDatedExe =
UCASE(ObjADORecordSet2.Fields("BackDatedExe").value)
parExecute_BackDatedVal= ObjADORecordSet2.Fields("BackDatedVal").value
parText_Date_Val=ObjADORecordSet2.Fields("Text_Date_Val").value
parRoutingFlag = ObjADORecordSet2.Fields("RoutingFlag").value
parLocation = ObjADORecordSet2.Fields("CityCode").value
parPlaceName = ObjADORecordSet2.Fields("PlaceName").value
parAirwayBillCode = (ObjADORecordSet2.Fields("AirwayBillNumber").value)
'
parAirwayBillCode1=ObjADORecordSet2.Fields("Genarated_Airway_Bill").value
parCallerName = ObjADORecordSet2.Fields("CallerName").value
If IsNull(parCallerName) OR parCallerName = "" Then parCallerName =
"Automation"&"-"& Cstr(Day(Now)&"-"&MonthName(Month(Now),True) &"-"& Year(Now))
' parAccountID = (ObjADORecordSet2.Fields("AgentAccount").value)
parFlightNum = ObjADORecordSet2.Fields("FlightNum").value
parAccountID = ObjADORecordSet2.Fields("AgentAccount").value
' parAccount = ObjADORecordSet2.Fields("Agent").value
parFlightDate = ObjADORecordSet2.Fields("FlightDate").value
parPieces = ObjADORecordSet2.Fields("Pieces").value
parWeight = ObjADORecordSet2.Fields("Weight").value
parVol = ObjADORecordSet2.Fields("Volume").value
parCarrier = ObjADORecordSet2.Fields("Carrier").value
parSourceStation = ObjADORecordSet2.Fields("SourceStation").value
If parLocation = "ORD" Then parLocation = "CHI"
'''Call
funcGetCityNameAndCode(parSourceStation,parPlaceName,parLocation)
parDesStation = ObjADORecordSet2.Fields("DestStation").value
parManiFestDesc = ObjADORecordSet2.Fields("ManiFestDesc").value
parCommodityCode = ObjADORecordSet2.Fields("CommodityCode").value
parProductName = ObjADORecordSet2.Fields("ProductName").value
parChargeCode = ObjADORecordSet2.Fields("ChargeCode").value
parSHCCode = ObjADORecordSet2.Fields("SHCCode").value
parConsigneeAccID = ObjADORecordSet2.Fields("ConsigneeAccID").value
parAWBExecutionType =
(ObjADORecordSet2.Fields("AWBExecutionType").value)
parScreeningType = ObjADORecordSet2.Fields("ScreeningType").value
parPSN = ObjADORecordSet2.Fields("PSN").value
parDGExpPCs = ObjADORecordSet2.Fields("DGExpPCs").value
parDGExpQty = ObjADORecordSet2.Fields("DGExpQty").value
parPaymentOption = ObjADORecordSet2.Fields("PaymentOption").value
parCreditPartyAccount =
ObjADORecordSet2.Fields("CreditPartyAccount_Org").value
parAmount = ObjADORecordSet2.Fields("Amount").value
parCardType = "VISA"'ObjADORecordSet2.Fields("CardType").value
parAPCreditCardNum =
"444555566667777"'ObjADORecordSet2.Fields("APCreditCardNum").value
parAPCreditCardExpireMonth =
"11"'ObjADORecordSet2.Fields("APCreditCardExpireMonth").value
parAPCreditCardExpireYear =
"2019"'ObjADORecordSet2.Fields("APCreditCardExpireYear").value
parAPCCCounter =
(ObjADORecordSet2.Fields("OriginCollectCounter").value)
parAPMCOAccNum = ObjADORecordSet2.Fields("APMCOAccNum").value
parAPCostCentDetailsAmt =
ObjADORecordSet2.Fields("APCostCentDetailsAmt").value
parAPCostCentCode = ObjADORecordSet2.Fields("APCostCentCode").value
parAPCheqNum = "123456"'ObjADORecordSet2.Fields("APCheqNum").value
parAPCheqDate = Cstr(Day(Now)&"-"&MonthName(Month(Now),True) &"-"&
Year(Now))'ObjADORecordSet2.Fields("APCheqDate").value
parAPCheqBankName =
"ICICI"'ObjADORecordSet2.Fields("APCheqBankName").value
parHouseAWBDetails = ObjADORecordSet2.Fields("HouseAWBDetails").value
parULDDimensionsDetails =
ObjADORecordSet2.Fields("ULDDimensionsDetails").value
parDGSummaryMode = ObjADORecordSet2.Fields("DGSummaryMode").value
parLoadInType = ObjADORecordSet2.Fields("LoadInType").value
DollyNo = ObjADORecordSet2.Fields("DollyNo").value
parULDDetails = ObjADORecordSet2.Fields("ULDDetails").value
parMultiLeg=(ObjADORecordSet2.Fields("Multi_Leg").value)
parThirdParty = (ObjADORecordSet2.Fields("Third_Party").value)
ParNegDiscount = (ObjADORecordSet2.Fields("NegDiscount").value)
If Not(parSHCCode = "" or parSHCCode = EMPTY) Then
ParOtherChargesCode =
ObjADORecordSet2.Fields("Other_Charge_Code").value
ParRA_Applicable = ObjADORecordSet2.Fields("RA_Applicable").value
End If
If (parExecute_SubModule = "AWB CAPTURE" OR parExecute_SubModule =
UCASE("Warehouse Acceptance") OR parExecute_SubModule = UCASE("Manifest and
Loading")OR parExecute_SubModule = "DEPART AND ARRIVAL" OR parExecute_SubModule =
"DELIVERY FLIGHT" or parExecute_SubModule = "CARGO ARRIVAL NOTIFICATION" or
parExecute_SubModule = "ARRIVE DOCUMENTS" or parExecute_SubModule = "AWB
FINALIZATION" OR parExecute_SubModule = "POD CAPTURE")Then
Call BC1_AWB0001_RESandBOOKINGForm_LaunchScreenCode("AWB0001")
Call
BC_AWB0001_EnterAWBGeneralDetails(parAWBExecutionType,parPlaceName,parLocation)
Call
BC_AWB0001_EnterHandlingandRatingDetails(parScreeningType,parWeight,ParOtherCharges
Code)
If Ucase(ParNegDiscount) = "YES" Then
parAmount = JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_ConstructRateLine").GetCellData(0,"Rate/Chg")
value_Apply_NegDisco =
BC_Apply_NegDisco(parLocation,parAirwayBillCode,parAmount,parText_Date_Val)
If value_Apply_NegDisco = TRUE Then
ObjADORecordSet2.Fields("NegDiscountApplied").value =
"APPLIED"
Else
ObjADORecordSet2.Fields("NegDiscountApplied").value =
"NOT APPLIED"
End If
End If
Call BC_AWB0001_CAR_HandlingandRating_NavToShowCashiering()
Call
BC_AWB0001_CAR_HandlingandRating_ShowCashiering_CC_Cash_MCO_CostCent(parCreditParty
Account,parCardType,parAmount,parAPCreditCardNum,parAPCreditCardExpireMonth,parAPCr
editCardExpireYear,parAPCCCounter,parAPMCOAccNum,parAPCostCentDetailsAmt,parAPCostC
entCode,parAPCheqNum,parAPCheqDate,parAPCheqBankName)
Call BC1_AWB0001_RESandBOOKINGForm_LaunchScreenCode("CSH0008")
Call BC1_AWB0001_RESandBOOKINGForm_LaunchScreenCode("AWB0001")
Call BC_AWB0001_RetriveAWBDetails()
Call
BC_AWB0001_Validation_HouseAWB(parHouseAWBDetails,parSourceStation,parDesStation)'
AWB capture
parExecution_Status =
ObjADORecordSet2.Fields("Execution_Progress").value
Call
gf_UpdateRecordsInDataSheet(ObjADORecordSet2,"Execution_Progress",parExecution_Stat
us&" --> AWB capture")
End If
If (parExecute_SubModule = UCASE("Warehouse Acceptance") OR
parExecute_SubModule = UCASE("Manifest and Loading")OR parExecute_SubModule =
"DEPART AND ARRIVAL" OR parExecute_SubModule = "DELIVERY FLIGHT" or
parExecute_SubModule = "CARGO ARRIVAL NOTIFICATION" or parExecute_SubModule =
"ARRIVE DOCUMENTS" or parExecute_SubModule = "AWB FINALIZATION" OR
parExecute_SubModule = "POD CAPTURE")Then
Call BC_AWB0001_EnterWareHouseAcceptanceDetails()'Warehouse
Acceptance
parExecution_Status =
ObjADORecordSet1.Fields("Execution_Progress").value
Call
gf_UpdateRecordsInDataSheet(ObjADORecordSet1,"Execution_Progress",parExecution_Stat
us&" --> Warehouse Acceptance")
End If
Next
End IF
End Function

Function BC_SHC_PET_Value(PaxAccompained,PNR_No,MP_No)
If PaxAccompained <> "" or PNR_No <> "" or MP_No <> "" Then
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTab("jTab_OpenScreenReport:").Select "SHC & Product"
If PaxAccompained <> "" Then
JavaWindow("UnitedCargo-360(QA2) - Home").JavaTable("Property
Set").SelectRow "#0"
JavaWindow("UnitedCargo-360(QA2) - Home").JavaTable("Property
Set").SetCellData "#0","Value",PaxAccompained

End If
If PNR_No <> "" Then
JavaWindow("UnitedCargo-360(QA2) - Home").JavaTable("Property
Set").SelectRow "#1"
JavaWindow("UnitedCargo-360(QA2) - Home").JavaTable("Property
Set").SetCellData "#1","Value",PNR_No
End If
If MP_No <> "" Then
JavaWindow("UnitedCargo-360(QA2) - Home").JavaTable("Property
Set").SelectRow "#2"
JavaWindow("UnitedCargo-360(QA2) - Home").JavaTable("Property
Set").SetCellData "#2","Value",MP_No
End If
End If

End Function
'
'AWB_Value =
"57952882;57952893;57952904;57952915;57952926;57952930;57952941;57952952;57952963;5
7952974;57952985;57952996;57953000;57953011;57953022;57953033;57953044;57953055;579
53066;57953070;57953081;57953092;57953103;57953114;57953125;57953136;57953140;57953
151;57953162;57953173;57953184;57953195;57953206;57953210;57953221;57953232;5795324
3;57953254;57953265;57953276;57953280;57953291;57953302;57953313;57953324;57953335;
57953346;57953350;57953361;57953372;57953383;57953394;57953405;57953416;57953420;57
953431"
'AWB_V = Split(AWB_Value,";")
'For i = 0 To Ubound(AWB_V)
' JavaWindow("UnitedCargo-360(QA2) - Home").JavaEdit("jEdit_AirWayBill").Set
AWB_V(i)
' wait(1)
' mSendKeys.SendKeys("{ENTER}")
' If JavaDialog("UnitedCargo360(QA3)").JavaButton("OK").Exist(3) Then
' JavaDialog("UnitedCargo360(QA3)").JavaButton("OK").Click
' Else
' JavaWindow("UnitedCargo-360(QA2) - Home").JavaToolbar("JToolBar").Press
"Clear"
' Print AWB_V(i)
' End If
'
'Next

'AWB_Value =
"55952562;55952573;55952584;55952595;55952606;55952610;55952621;55952632;55952643;5
7951294;57951305;57951316;;57951320;57951331;57951342;57951353;57951364;57951375;57
951386;57951390"
'AWB_Value =
"57953873;57953884;57953895;57953906;57953910;57953921;57953932;57953943;57953954;5
7953965;57953976;57953980;57953991;57954002;57954013;57954024;57954046;57954050;579
54061;57954072;57954083;57954094;57954105;57954116;57954120;57954131;57954142;57954
164;57954190;57954201;57954212"
'AWB_V = Split(AWB_Value,";")
'For i = 0 To Ubound(AWB_V)
'JavaWindow("UnitedCargo-360(QA2) - Home").JavaToolbar("JToolBar").Press "Clear"
'JavaWindow("UnitedCargo-360(QA2) - Home").JavaEdit("Doc. Number :").Set AWB_V(i)
'JavaWindow("UnitedCargo-360(QA2) - Home").JavaButton("Get Charges").Click
' wait 3
'
''JavaWindow("UnitedCargo-360(QA2) - Home").JavaTable("Rate Lines").ActivateRow
"#0"
''JavaWindow("UnitedCargo-360(QA2) - Home").JavaDialog("Rate Details").Close
'
' e = JavaWindow("UnitedCargo-360(QA2) - Home").JavaTable("Doc.
Details").GetCellData("#0","Date")
' c = JavaWindow("UnitedCargo-360(QA2) - Home").JavaTable("Rate
Lines").GetCellData("#0","Rate Id")
' d = JavaWindow("UnitedCargo-360(QA2) - Home").JavaTable("Rate
Lines").GetCellData("#0","Source")
' JavaWindow("UnitedCargo-360(QA2) - Home").JavaTable("Rate
Lines").DoubleClickCell "#0","#0"
' wait 2
'
''JavaWindow("UnitedCargo-360(QA2) - Home").JavaDialog("Rate
Details").JavaTable("JSortableTable").ActivateRow "#0"
' If JavaWindow("UnitedCargo-360(QA2) - Home").JavaDialog("Rate
Details").JavaTable("JSortableTable").Exist(2) and d <>"ADH" Then
' f = JavaWindow("UnitedCargo-360(QA2) - Home").JavaDialog("Rate
Details").JavaTable("JSortableTable").GetColumnName(15)
' If f = "Effective Date" Then
' a = JavaWindow("UnitedCargo-360(QA2) - Home").JavaDialog("Rate
Details").JavaTable("JSortableTable").GetCellData("#0","Effective Date")
' b = JavaWindow("UnitedCargo-360(QA2) - Home").JavaDialog("Rate
Details").JavaTable("JSortableTable").GetCellData("#0","Expiry Date")
' End If
' End If
'
' If JavaWindow("UnitedCargo-360(QA2) - Home").JavaDialog("Rate
Details").Exist(2) Then
' JavaWindow("UnitedCargo-360(QA2) - Home").JavaDialog("Rate
Details").Close
' End If
'
' JavaWindow("UnitedCargo-360(QA2) - Home").JavaToolbar("JToolBar").Press
"Clear"
' Print AWB_V(i)&":"&e&"-"&c&"-"&d&"-"&a&"-"&b
'a= ""
'b= ""
'c = ""
'd = ""
'e= ""
'f = ""
'
'Next
'
'
'Set objFileToRead = CreateObject("Scripting.FileSystemObject").OpenTextFile("C:\
CItycodes.txt",1)
''Set obj = createobject("Excel.Application")
''obj.visible=True
''Set obj1 = obj.Workbooks.Add()
'DataTable.SetCurrentRow(1)
'DataTable.Value("STATION","Action1") = "1"
'DataTable.Value("STATION","Action1")="Station"
'DataTable.Value("STATION_NAME","Action1") = "1"
'DataTable.Value("STATION_NAME","Action1")="Station name"
'DataTable.Value("CITY","Action1")="City"
'DataTable.Value("CITY_NAME","Action1")="City name"
'DataTable.Value("COUNTRY","Action1")="Country"
'
'Dim strLine
'i = 1
'do while not objFileToRead.AtEndOfStream
'strLine = objFileToRead.ReadLine()
'a = Split(strLine,"-")
'i = i+1
'DataTable.SetCurrentRow(i)
'DataTable.Value("STATION","Action1")=a(0)
'DataTable.Value("STATION_NAME","Action1")=a(1)
'DataTable.Value("CITY","Action1")=a(2)
'DataTable.Value("CITY_NAME","Action1")=a(3)
'DataTable.Value("COUNTRY","Action1")=a(4)
'loop
'objFileToRead.Close
'Set objFileToRead = Nothing
'
''obj1.SaveAs "C:\CItycodes.xls"
''obj1.Close
''obj.Quit
''Set obj1=Nothing
'Set obj=Nothing

AWB_Value = "62377232:0944:08-Aug-2021:09-Aug-2021:ORD:FRA;62377265:0944:08-Aug-
2021:09-Aug-2021:ORD:FRA;62377291:0944:08-Aug-2021:09-Aug-
2021:ORD:FRA;62377324:0944:08-Aug-2021:09-Aug-2021:ORD:FRA;62377350:0944:08-Aug-
2021:09-Aug-2021:ORD:FRA;62377383:0944:08-Aug-2021:09-Aug-
2021:ORD:FRA;62377416:0944:08-Aug-2021:09-Aug-2021:ORD:FRA;62377442:0944:08-Aug-
2021:09-Aug-2021:ORD:FRA;62377475:0944:08-Aug-2021:09-Aug-
2021:ORD:FRA;62377501:0944:08-Aug-2021:09-Aug-2021:ORD:FRA;62377534:0944:08-Aug-
2021:09-Aug-2021:ORD:FRA;62377560:0944:08-Aug-2021:09-Aug-2021:ORD:FRA;"

AWB_V = Split(AWB_Value,";")
For i = 0 To Ubound(AWB_V)
x = Split(AWB_V(i),":")
parExecute_SubModule = "POD CAPTURE"
parChargeCode = "CC"
ParCarrierCode = "UA"
parAirwayBillCode = x(0)
parSourceStation = ""
parLocation = ""
parAccountID = ""
parArrLocation = x(5)
parSourceStation = x(4)
parDesStation = x(5)
parPaymentOption = "Cash"
parCreditPartyAccount_Dest = ""
parAmount = ""
parCardType = "VISA"'ObjADORecordSet4.Fields("CardType").value
parAPCreditCardNum =
"444555566667777"'ObjADORecordSet4.Fields("APCreditCardNum").value
parAPCreditCardExpireMonth =
"11"'ObjADORecordSet4.Fields("APCreditCardExpireMonth").value
parAPCreditCardExpireYear =
"2019"'ObjADORecordSet4.Fields("APCreditCardExpireYear").value
parAPCCCounter = ""
parDestCounter = ""
parAPMCOAccNum = ""
parAPCostCentDetailsAmt = ""
parAPCostCentCode = ""
parAPCheqNum =
"123456"'ObjADORecordSet4.Fields("APCheqNum").value
parAPCheqDate = Cstr(Day(Now)&"-"&MonthName(Month(Now),True)
&"-"& Year(Now))'ObjADORecordSet4.Fields("APCheqDate").value
parAPCheqBankName =
"ICICI"'ObjADORecordSet4.Fields("APCheqBankName").value
parNegDiscount = "NO"
'parExecution_Status =
ObjADORecordSet4.Fields("Execution_Progress").value
parMulti_Leg = "NO"
parFlightNum = x(1)
parFlightDate = x(2)
If UCASE(parMulti_Leg) = "YES" Then
ParNoOfConnections =
Cint(ObjADORecordSet4.Fields("No_Of_Connections").value)
ParConnections =
(ObjADORecordSet4.Fields("Connections").value)
Else
ParNoOfConnections = 0
parArrLocation = parDesStation
End If
parArrLocation = parDesStation
parArrLocation = CityName(parArrLocation)
If UCASE(parNegDiscount) = "NO" Then
parNegDiscountApplied = "NOT APPLIED"
parPartialAdhoc = "NOT APPROVED"
Else
parNegDiscountApplied =
ObjADORecordSet4.Fields("NegDiscountApplied").value
parPartialAdhoc =
UCASE(ObjADORecordSet4.Fields("PartialAdhoc").value)
End If
If (parExecute_SubModule = "AWB FINALIZATION" OR
parExecute_SubModule = "POD CAPTURE") and (parNegDiscountApplied <> "NOT APPLIED"
or Ucase(parNegDiscount) = "NO" or parPartialAdhoc = "NOT APPROVED") Then
' 'Call
BC_AWB0001_CustomClearance_Destination(parSourceStation,parDesStation)
Call BC_ChangeCITYandSTATION(parArrLocation)
Call
BC1_AWB0001_RESandBOOKINGForm_LaunchScreenCode("GHO0001")
Call
BC1_GHO0001_ShipmentDelivery_AWBFinalizationAWD(x(1),x(2))
'Call
gf_UpdateRecordsInDataSheet(ObjADORecordSet4,"Execution_Progress",parExecution_Stat
us&" --> AWB Finalization")
If parExecute_SubModule = "DELIVERY FLIGHT" or
parExecute_SubModule = "POD CAPTURE" Then
Call
BC_AWB0001_HandlingandRating_AGT_CC_FOPs(parCreditPartyAccount_Dest,parCardType,par
Amount,parAPCreditCardNum,parAPCreditCardExpireMonth,parAPCreditCardExpireYear,parD
estCounter,parAPMCOAccNum,parAPCostCentDetailsAmt,parAPCostCentCode,parAPCheqNum,pa
rAPCheqDate,parAPCheqBankName)
Call
BC_GHO0001_ShipmentDelivery_DeliveryOrder(parFlightNum,parFlightDate)
Call
BC3_GHO0001_ShipmentDelivery_DeliverySlip(parFlightNum)
' parExecution_Status =
ObjADORecordSet4.Fields("Execution_Progress").value
' Call
gf_UpdateRecordsInDataSheet(ObjADORecordSet4,"Execution_Progress",parExecution_Stat
us&" --> Delivered Slip '"+intExpDelSlipNum+"' ")
If (parExecute_SubModule = "POD CAPTURE") Then
Call BC4_GHO0001_ShipmentDelivery_CapturePOD()
' parExecution_Status =
ObjADORecordSet4.Fields("Execution_Progress").value
' Call
gf_UpdateRecordsInDataSheet(ObjADORecordSet4,"Execution_Progress",parExecution_Stat
us&" --> POD Captured")
' Call
BC1_AWB0001_RESandBOOKINGForm_LaunchScreenCode("CSH0008")
' Call
BC_CSH0008_END_ISRClosure(parArrLocation,parFlightDate,parDestCounter)
End If
End If
End If

Next

'''''''''''''''''''''''''''''''''''''''''''''''@#############################
############################################33

AWB_Value = "62377232:0944:08-Aug-2021:09-Aug-2021:ORD:FRA;62377265:0944:08-
Aug-2021:09-Aug-2021:ORD:FRA;62377291:0944:08-Aug-2021:09-Aug-
2021:ORD:FRA;62377324:0944:08-Aug-2021:09-Aug-2021:ORD:FRA;62377350:0944:08-Aug-
2021:09-Aug-2021:ORD:FRA;62377383:0944:08-Aug-2021:09-Aug-
2021:ORD:FRA;62377416:0944:08-Aug-2021:09-Aug-2021:ORD:FRA;62377442:0944:08-Aug-
2021:09-Aug-2021:ORD:FRA;62377475:0944:08-Aug-2021:09-Aug-
2021:ORD:FRA;62377501:0944:08-Aug-2021:09-Aug-2021:ORD:FRA;62377534:0944:08-Aug-
2021:09-Aug-2021:ORD:FRA;62377560:0944:08-Aug-2021:09-Aug-2021:ORD:FRA;"
AWB_V = Split(AWB_Value,";")
For j = 0 To Ubound(AWB_V)
x = Split(AWB_V(j),":")
parAirwayBillCode = x(0)
parDollyNo = "CUA"&Replace((Replace(Time,":",""))," ","")
parULDDetails = ""
parFlightNum = x(1)
parFlightDate = x(2)
parFlightArrDate =x(3)
parSourceStation = x(4)
parDesStation = x(5)
parArrLocation = CityName(parSourceStation)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaToolbar("JToolBar").Press "Clear"
Call BC_ChangeCITYandSTATION(parArrLocation)
Call
BC1_AWB0001_RESandBOOKINGForm_LaunchScreenCode("EXP0001")
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaEdit("jEdit_FlightNum").Set parFlightNum
Wait(3)
JavaWindow("UnitedCargo-360(QA2) - Home").JavaEdit("jEdit_FD_Date").Set
parFlightDate
Wait(3)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaButton("jBtn_FlightDept_Search").Click
Wait 3
intRowCount=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FlightDetails").GetROProperty("rows")

For i = 0 To intRowCount-1
intFlightScheduleDate=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FlightDetails").GetCellData(i,6)
strBrdPoint=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FlightDetails").GetCellData(i,4)
strArrPoint=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FlightDetails").GetCellData(i,5)
Wait(3)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaButton("jBtn_FlightDepart_ViewShipments").Click
wait 2
JavaWindow("UnitedCargo-360(QA2) - Home").JavaButton("Adv.
Shipment Filter").Click
JavaWindow("UnitedCargo-360(QA2) - Home").JavaDialog("FPW -
Advanced view shipments").JavaCheckBox("All Products").Set "ON"
For k = 0 To 4
If Not(JavaWindow("UnitedCargo-360(QA2) -
Home").InsightObject("Booking_State").Exist(1)) Then
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("FPW -Advanced view shipments").JavaButton("Booking St. :").Click
End If
Next
JavaWindow("UnitedCargo-360(QA2) - Home").JavaDialog("FPW -
Advanced view shipments").JavaButton("Mvt. St.").Click
JavaWindow("UnitedCargo-360(QA2) - Home").JavaDialog("FPW -
Advanced view shipments").JavaButton("View").Click
Exit for
Next
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''
intRowCount=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable1_BookedShipments").GetROProperty("rows")
FlightStatus = JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FlightDetails").GetCellData("#0","Status")
If FlightStatus <> "DEP" Then
For i = 0 To intRowCount-1
strDocNum=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable1_BookedShipments").GetCellData(i,2)
intExpAirWayBillID=split(strDocNum,"-")
If strComp(intExpAirWayBillID(1),parAirwayBillCode,0)=0
Then
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable1_BookedShipments").ActivateRow i
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable1_BookedShipments").SelectRow i
Wait(3)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_SD_CargoDelInfo").ClickCell 0,2,"RIGHT"
Wait(3)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaMenu("jMenu_Manifest").JavaMenu("jMenu_Generate").Select
Wait(3)
Temp = True
Exit For
End if
Next
If Temp = TRUE Then
Wait 3
If JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDailog_Generate").Exist(0.3) Then
Reporter.ReportEvent micPass,"Validation for Manifest
Generate", "Sucessfully Manifest --> Generate dailog appeared"
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDailog_Generate").JavaButton("jBtn_OK").Click
End If
Wait 3
If JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_Conformation").Exist(0.3) Then
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_Conformation").JavaButton("jBtn_OK").Click
End If
' Load Flight
End If
End If
If JavaWindow("UnitedCargo-360(QA2) -
Home").JavaButton("Push_Down").Exist(0.3) Then
JavaWindow("UnitedCargo-360(QA2) - Home").JavaButton("Push_Down").Click
End If
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''
intRowCount=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable1_BookedShipments").GetROProperty("rows")
gstrStepName = "Load Booking Shipments"
For i = 0 To intRowCount-1
strDocNum=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable1_BookedShipments").GetCellData(i,2)
intExpAirWayBillID=split(strDocNum,"-")
If intExpAirWayBillID(1)=parAirwayBillCode Then
AWB_Status = JavaWindow("UnitedCargo-360(QA2)
-").JavaTable("JSortableTable").GetCellData(i,"Mvt. Sts.")
If AWB_Status = "MAN" or AWB_Status = "RCS" Then
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable1_BookedShipments").ActivateRow i
wait 1
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable1_BookedShipments").SelectRow i
Wait(1)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable1_BookedShipments").ClickCell 0,2,"RIGHT"
Wait(2)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaMenu("jMenu_Load").Select
Wait 5
If JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_FD_Load").Exist(0.3) Then
parLoadInType = "BULK"
If parLoadInType = "BULK" Then
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_FD_Load").JavaList("jList_LoadIn").Select parLoadInType
Wait(2)
blnStatus=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_FD_Load").JavaEdit("jEdit_DollyNo").GetROProperty("enabl
ed")
If blnStatus=1 Then
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_FD_Load").JavaEdit("jEdit_DollyNo").Set parDollyNo
Wait(2)
mSendKeys.SendKeys("{TAB}")
Wait(2)
End If
ElseIf parLoadInType = "ULD" Then
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_FD_Load").JavaEdit("jEdit_ULDID1").Set arrrULDDetails(0)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_FD_Load").JavaEdit("jEdit_ULDID2").Set arrrULDDetails(1)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_FD_Load").JavaEdit("jEdit_ULDID3").Set arrrULDDetails(2)
End If
If JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("ULD - Loading").JavaDialog("Validation
Errors").JavaButton("Yes").Exist(0.3) Then
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("ULD - Loading").JavaDialog("Validation
Errors").JavaButton("Yes").Click
End If
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_FD_Load").JavaButton("jBtn_Save").Click
If JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_FD_Load_2").JavaDialog("Validation
Errors").JavaButton("Yes").Exist(2) Then
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_FD_Load_2").JavaDialog("Validation
Errors").JavaButton("Yes").Click
End If
For K = 1 To 10
If JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDailog_BusyStatusController").Exist(1) Then
wait 1
Else
Exit For
End If
Next
ElseIf JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_FD_Load").JavaDialog("UnitedCargo-ErrorMsg").Exist(3)
Then
strExpMessage=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_FD_Load").JavaDialog("UnitedCargo-
ErrorMsg").JavaStaticText("jStatic_UnimacMessage").GetROProperty("text")
Reporter.ReportEvent micFail,"Validation for Flight
Depart Loading Shipments","Load Manifesto Functionality Failed due to the following
error : "& " "&strExpMessage
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_FD_Load").JavaDialog("UnitedCargo-
ErrorMsg").JavaButton("jBtn_OK").Click
End If
End If
End If
Next
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''
If JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable1_BookedShipments").Exist And blnTestExecutionStatus = True
Then
intT1RowCount=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable1_BookedShipments").GetROProperty("rows")
intT2RowCount=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_BookedShipments").GetROProperty("rows")
If JavaWindow("UnitedCargo-360(QA2) -
Home").JavaButton("Push_Down").Exist(0.3) Then
JavaWindow("UnitedCargo-360(QA2) - Home").JavaButton("Push_Down").Click
End If
For intCount1 = 0 To intT1RowCount-1
intAirWayBillCode=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable1_BookedShipments").GetCellData(intCount1,2)
intExpAirWayBillCode=Split(intAirWayBillCode,"-")
intMvtSts=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_BookedShipments").GetCellData(intCount1,12)
If intExpAirWayBillCode(1)=parAirwayBillCode Then
FlightStatus = JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FlightDetails").GetCellData("#0","Status")
AWB_Status = intMvtSts
If FlightStatus <> "DEP" Then
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_BookedShipments").ActivateRow intCount1
Wait(1)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable1_BookedShipments").SelectRow intCount1
Wait(1)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable1_BookedShipments").ClickCell 0,1,"RIGHT"
Wait(1)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaMenu("jMenu_Manifest").JavaMenu("Finalise").Select
wait(5)
ElseIf AWB_Status = "MAN" or AWB_Status = "RCS" Then
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_BookedShipments").SelectRow intCount1
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_BookedShipments").Click 0,1,"RIGHT"
JavaWindow("UnitedCargo-360(QA2) - Home").JavaMenu("Depart
Shipment(s)").Select
End If

If JavaDialog("jDialog_ValidationErrors").Exist(0.3) Then

JavaDialog("jDialog_ValidationErrors").JavaButton("jBtn_Close").Click
End If

If JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_FinalizeManifest").Exist(0.3) Then
Reporter.ReportEvent micPass,"Validation for Finalize manifest
dailog","Successfully finilize manifest dailog appeared"
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_FinalizeManifest").JavaButton("jBtn_Save").Click
If JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_FinalizeManifest").JavaDialog("jDialog_ValidationErrors"
).Exist(0.3) Then
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_FinalizeManifest").JavaDialog("jDialog_ValidationErrors"
).JavaButton("jBtn_Yes").Click
End If
If JavaDialog("jDialog_ValidationErrors").Exist(0.3) Then

JavaDialog("jDialog_ValidationErrors").JavaButton("jBtn_Close").Click
End If
End If
wait 3
If JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_Conformation").Exist(0.3) Then
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_Conformation").JavaButton("jBtn_OK").Click
Exit For
Else
Exit For
End If
End If
Next
End If
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''
intRowCount=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FlightDetails").GetROProperty("rows")
For i = 0 To intRowCount-1
intFlightNum=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FlightDetails").GetCellData(i,2)

strBrdPoint=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FlightDetails").GetCellData(i,4)
strArrPoint=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FlightDetails").GetCellData(i,5)
intFlightScheduleDate=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FlightDetails").GetCellData(i,6)
strFlightStatus=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FlightDetails").GetCellData(i,18)

intFlightETD=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FlightDetails").GetCellData(i,7)
intFlightETD1Len=len(intFlightETD)
'Validation for required flight is selected or not
If (cint(intFlightNum)=cInt(parFlightNum)) and (strFlightStatus="MAN")
Then
' If (cDATE(intFlightScheduleDate)=cDATE(parFlightDate)) and
(strBrdPoint=parSourceStation) and (strArrPoint=parDesStation) Then
Reporter.ReportEvent micPass,"Flight Selection", "Required
Flight got selected: "&parFlightNum
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FlightDetails").ActivateRow(i)
wait(2)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FlightDetails").SelectRow(i)
wait(2)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FlightDetails").ClickCell i,1,"RIGHT"
wait(2)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaMenu("jMenu_DepartFlight").Select
wait(10)
If JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_Validation Errors").Exist(0.3) Then
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_Validation Errors").JavaButton("jBtn_Close").Click
End If

If JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDailog_DepartFlight").JavaButton("jBtn_Yes").Exist(0.3) Then
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDailog_DepartFlight").JavaButton("jBtn_Yes").Click
End If

If JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDailog_DepartFlight").Exist(0.3) Then
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDailog_DepartFlight").JavaEdit("jEdit_ActualDate").Set
intFlightScheduleDate
Wait(3)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDailog_DepartFlight").JavaEdit("jEdit_ActlHrs").SetFocus()
Wait(3)
If intFlightETD1Len=4 Then
intFlightETDHrs=mid(intFlightETD,1,2)
intFlightETDMins=mid(intFlightETD,3,4)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDailog_DepartFlight").JavaEdit("jEdit_ActlHrs").Set
intFlightETDHrs
Wait(3)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDailog_DepartFlight").JavaEdit("jEdit_ActMins").Set
intFlightETDMins
Wait(3)
ElseIf intFlightETD1Len<>4 Then
intFlightETDHrs=mid(intFlightETD,1,1)
intFlightETDMins=mid(intFlightETD,2,3)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDailog_DepartFlight").JavaEdit("jEdit_ActlHrs").Set
intFlightETDHrs
Wait(3)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDailog_DepartFlight").JavaEdit("jEdit_ActMins").Set
intFlightETDMins
Wait(3)
End If
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDailog_DepartFlight").JavaButton("jBtn_OK").Click
wait 5
If JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_Conformation").Exist(0.3) Then
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_Conformation").JavaButton("jBtn_OK").Click
Exit For
Else
Exit For
End If
End if
ElseIf strFlightStatus="DEP" Then
' Call gfReportExecutionStatus(micDone,"'"+parFlightNum+"' is
already departed")
End If
Next
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaToolbar("JToolBar").Press "Clear"
parArrLocation = CityName(parDesStation)
Call BC_ChangeCITYandSTATION(parArrLocation)
Call
BC1_AWB0001_RESandBOOKINGForm_LaunchScreenCode("IMP0002")
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Wait (3)
' JavaWindow("UnitedCargo-360(QA2) - Home").JavaEdit("FltNo").highlight
JavaWindow("UnitedCargo-360(QA2) - Home").JavaEdit("Search_2").highlight
' JavaWindow("UnitedCargo-360(QA2) - Home").JavaEdit("FltNo").Set parFlightNum
JavaWindow("UnitedCargo-360(QA2) - Home").JavaEdit("Search_2").Set
parFlightNum
Wait (3)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaEdit("JEdit_FltArr_FltNum").highlight
JavaWindow("UnitedCargo-360(QA2) - Home").JavaEdit("JEdit_FltArr_FltNum").Set
parFlightNum
wait(2)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaEdit("jEdit_FltArr_FlightDate").highlight
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaEdit("jEdit_FltArr_FlightDate").Set parFlightArrDate
wait(2)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaButton("jBtn_FltArr_Search").Click
Wait 5
intRowCount=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FltArrivalDetails").GetROProperty("rows")
'Searching for required record
For i = 0 To intRowCount-1
intFlightNum=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FltArrivalDetails").GetCellData(i,1)
strDate=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FltArrivalDetails").GetCellData(i,3)
strEstDate=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FltArrivalDetails").GetCellData(i,5)
strFlightArrStatus=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FltArrivalDetails").GetCellData(i,15)
'msgbox strFlightArrStatus
If strFlightArrStatus="DEP" Then
If (intFlightNum=cInt(parFlightNum)) and
(CDate(parFlightArrDate)=CDate(strDate))Then
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FltArrivalDetails").ActivateRow(i)
Wait(3)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FltArrivalDetails").SelectRow(i)
Wait(3)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FltArrivalDetails").ClickCell i,1,"RIGHT"
Wait(2)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaMenu("jMenu_ArrivalFlight").Select
Wait 5
If JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDailog_FltArr_CaptureFlightATA").Exist Then

If Date <= Cdate(parFlightDate) Then


Call KillSkyChainProcess("iexplore.exe")
Systemutil.Run "iexplore.exe","www.google.com"
If parDesStation = "SFO" Then strTimeZone = "San
Francisco"
If parDesStation = "ORD" Then strTimeZone = "Chicago"
If parDesStation = "FRA" Then strTimeZone =
"Frankfurt"
If parDesStation = "LHR" Then strTimeZone = "London"
If parDesStation = "DEN" Then strTimeZone =
"Mountain"
If parDesStation = "EWR" Then strTimeZone = "Eastern
Daylight Time"
If parDesStation = "TPA" Then strTimeZone = "Florida"
If parDesStation = "FLL" Then strTimeZone = "Florida"
If parDesStation = "RSW" Then strTimeZone = "Florida"
If parDesStation = "MCO" Then strTimeZone = "Florida"
If parDesStation = "MIA" Then strTimeZone = "Florida"
If parDesStation = "LGA" Then strTimeZone = "New
York"
If parDesStation = "BOS" Then strTimeZone =
"Massachusetts"
If parDesStation = "PHL" Then strTimeZone =
"Pennsylvania"

If Browser("Google").Page("Google").Exist(60) Then
Browser("Google").Page("Google").WebEdit("q").Set
"Time in "& strTimeZone
Browser("Google").Page("Google").WebButton("Google
Search").Click
Browser("Google").Page("Google").Sync
Set
objWaitElement=Browser("Google").Page("Google").WebElement("Class
Name:=WebElement","class:=.*.card-section.*.","innertext:=.*.AM.*.|.*.PM.*.","html
tag:=DIV")
Call
WaitToEnable(objWaitElement,Environment.Value("gparWaitTime"))
strArrivalTime =
Browser("Google").Page("Google").WebElement("Class
Name:=WebElement","class:=.*.card-section.*.","innertext:=.*.AM.*.|.*.PM.*.","html
tag:=DIV").GetROProperty("outertext")
strArrivalDate =
Browser("Google").Page("Google").WebElement("Class
Name:=WebElement","class:=.*.card-section.*.","innertext:=.*.AM.*.|.*.PM.*.","html
tag:=DIV").GetROProperty("outertext")
strArrivalDate = Trim(Split(Split(strArrivalDate,",")
(1),"(")(0))&" "&Trim(Split(Split(strArrivalDate,",")(2),"(")(0))
arrArrivalDate = Split(strArrivalDate," ")
strArrivalDate =
Left(arrArrivalDate(1),3)+"-"+arrArrivalDate(0)+"-"+arrArrivalDate(2)
Call KillSkyChainProcess("iexplore.exe")
End If
If Split(strArrivalTime ," ")(1) = "PM" AND
Split(strArrivalTime ,":")(0) <> "12" Then
strArrivalTime_HH =
Cstr(Cint(Split(Split(strArrivalTime ," ")(0),":")(0))+12)
Else
strArrivalTime_HH =
Cstr(Split(Split(strArrivalTime ," ")(0),":")(0))
End If
strArrivalTime_MM = Split(Split(strArrivalTime ," ")
(0),":")(1)
If Len(strArrivalTime_HH) = 1 Then strArrivalTime_HH
= "0"& strArrivalTime_HH
If Len(strArrivalTime_MM) = 1 Then strArrivalTime_MM
= "0"& strArrivalTime_MM

If cdate(strArrivalDate) > Cdate(parFlightDate)


Then
strArrivalDate = parFlightDate
End If
Else
strArrivalDate = parFlightDate

End If
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDailog_FltArr_CaptureFlightATA").JavaEdit("jEdit_FltArr_ATADate
").Set strArrivalDate
Wait(3)
If strArrivalTime_HH = "" or strArrivalTime_MM = ""
or strArrivalTime_HH = EMPTY or strArrivalTime_MM = EMPTY Then
a = JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FltArrivalDetails").GetCellData(0,"STA")
If Len(a) = 4 Then
strArrivalTime_MM = Mid(a,3)
strArrivalTime_HH = Mid(a,1,2)
ElseIf Len(a) = 3 Then
strArrivalTime_MM = Mid(a,2)
strArrivalTime_HH = Mid(a,1,1)
End If
End If
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDailog_FltArr_CaptureFlightATA").JavaEdit("jEdit_FltArr_Hours")
.Set strArrivalTime_HH
Wait(3)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDailog_FltArr_CaptureFlightATA").JavaEdit("jEdit_FltArr_Mins").
Set strArrivalTime_MM
Wait(3)

ActArrivalTime = strArrivalDate+"
"+strArrivalTime_HH+":"+strArrivalTime_MM

JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDailog_FltArr_CaptureFlightATA").JavaButton("jBtn_FltArr_Save")
.Click
wait 5
End If
'Validating Flight Arrival status
strFlightStatus=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FltArrivalDetails").GetCellData(i,15)
If strFlightStatus="ARR" Then
Exit For
End If
End if
ElseIf strFlightArrStatus="ARR" Then
End If
Next
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaButton("jBtn_FltArr_ViewShipments").Click
Wait(3)
For i = 1 To 10
If JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDailog_BusyStatusController").Exist(1) Then
wait 1
Else
Exit For
End If
Next
intRowCount = Cint(JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FltArr_ViewShippments").GetROProperty("rows"))
For i=0 To intRowCount-1
strDocNum=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FltArr_ViewShippments").GetCellData(i,3)
intExpAirWayBillID=split(strDocNum,"-")

parExecute_SubModule = "POD CAPTURE"

If parExecute_SubModule = "DELIVERY FLIGHT" or


parExecute_SubModule = "ARRIVE DOCUMENTS" or parExecute_SubModule = "AWB
FINALIZATION" OR parExecute_SubModule = "POD CAPTURE" Then
Airwayill_status = JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FltArr_ViewShippments").GetCellData(i,"Mvt. Status")
If Airwayill_status = "ARR" or Airwayill_status = "DEP"
Then
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FltArr_ViewShippments").ActivateRow(i)
Wait(1)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FltArr_ViewShippments").SelectRow(i)
wait(1)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FltArr_ViewShippments").ClickCell 0,3,"RIGHT"
Wait(1)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaMenu("jMenu_LocateShipment").Select
If JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_Locking Errors").Exist(5) Then
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_Locking Errors").JavaButton("jBtn_OK").Click
End If
wait 5
If JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_FltArr_Shippment_WarehouseDetails").Exist(0.3) Then

JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_FltArr_Shippment_WarehouseDetails").JavaObject("JTableCo
ntainerPane").Click 205,46,"RIGHT"
wait(1)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_FltArr_Shippment_WarehouseDetails").JavaMenu("jMenu_NewW
arehouse").Select
Wait(2)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDialog_FltArr_Shippment_WarehouseDetails").JavaButton("jBtn_Flt
Arr_Ship_Save").Click
For K = 1 To 10
If JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("jDailog_BusyStatusController").Exist(1) Then
wait 1
Else
Exit For
End If
Next
End If
End If
ElseIf parExecute_SubModule = "CARGO ARRIVAL NOTIFICATION" Then
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FltArr_ViewShippments").ActivateRow(i)
Wait(1)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FltArr_ViewShippments").SelectRow(i)
wait(1)

JavaWindow("UnitedCargo-360(QA2) -
Home").JavaMenu("jMenu_View").Select
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaMenu("jMenu_View").JavaMenu("Cargo Arrival Notification").Select
wait 2
If JavaWindow("UnitedCargo-360(QA2) -
Home").JavaToolbar("JToolBar").Exist(5) Then
Edit_Value = JavaWindow("UnitedCargo-360(QA2) -
Home").JavaButton("jBtn_Edit").GetROProperty("enabled")
End If

If Edit_Value = 1 or Edit_Value Then


JavaWindow("UnitedCargo-360(QA2) -
Home").JavaButton("jBtn_Edit").Click
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaObject("JTableContainerPane_5").Click 50,50,"RIGHT"
If JavaWindow("UnitedCargo-360(QA2) -
Home").JavaMenu("New").Exist(4) Then
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaMenu("New").Select
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("Page").SetCellData "#0","Customer Type","Consignee"
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("Page").SetCellData "#0","Contact ID","PHONE"
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("Page").SetCellData "#0","Contact No","9876543210"
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaButton("Send & Save Notification").Click
If True Then

End If
Call
gfReportExecutionStatus(micPass,"Notification sent sucessful"&
intExpAirWayBillID(1))
End If
End If
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaButton("jBtn_Close").Click
ElseIf parExecute_SubModule = "ARRIVE DOCUMENTS" Then
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FltArr_ViewShippments").ActivateRow(i)
Wait(1)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FltArr_ViewShippments").SelectRow(i)
wait(1)
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_FltArr_ViewShippments").ClickCell 0,3,"RIGHT"
Wait(1)
JavaWindow("UnitedCargo-360(QA2) - Home").JavaMenu("Arrive
Documents (AWR)").Select
wait 1
If JavaWindow("UnitedCargo360(QA3) -").JavaDialog("Arrive
Documents(AWR)").JavaButton("OK").Exist(5) Then
JavaWindow("UnitedCargo360(QA3)
-").JavaDialog("Arrive Documents(AWR)").JavaButton("OK").Click
ElseIf JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("UnitedCargo360(QA3)").JavaButton("OK").Exist(5) Then
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaDialog("UnitedCargo360(QA3)").JavaButton("OK").Click
End If
End If
Next

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''

Next

'''''''''''''''''''''''''''@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@2

AWB_Value = "62377232:0944:08-Aug-2021:09-Aug-2021:ORD:FRA;62377265:0944:08-
Aug-2021:09-Aug-2021:ORD:FRA;62377291:0944:08-Aug-2021:09-Aug-
2021:ORD:FRA;62377324:0944:08-Aug-2021:09-Aug-2021:ORD:FRA;62377350:0944:08-Aug-
2021:09-Aug-2021:ORD:FRA;62377383:0944:08-Aug-2021:09-Aug-
2021:ORD:FRA;62377416:0944:08-Aug-2021:09-Aug-2021:ORD:FRA;62377442:0944:08-Aug-
2021:09-Aug-2021:ORD:FRA;62377475:0944:08-Aug-2021:09-Aug-
2021:ORD:FRA;62377501:0944:08-Aug-2021:09-Aug-2021:ORD:FRA;62377534:0944:08-Aug-
2021:09-Aug-2021:ORD:FRA;62377560:0944:08-Aug-2021:09-Aug-2021:ORD:FRA;"
AWB_V = Split(AWB_Value,";")
For i = 0 To Ubound(AWB_V)
x = Split(AWB_V(i),":")
parExecute_SubModule = "POD CAPTURE"
parChargeCode = "CC"
ParCarrierCode = "UA"
parAirwayBillCode = x(0)
parSourceStation = ""
parLocation = ""
parAccountID = ""
parArrLocation = x(5)
parSourceStation = x(4)
parDesStation = x(5)
parPaymentOption = "Cash"
parCreditPartyAccount_Dest = ""
parAmount = ""
parCardType = "VISA"'ObjADORecordSet4.Fields("CardType").value
parAPCreditCardNum =
"444555566667777"'ObjADORecordSet4.Fields("APCreditCardNum").value
parAPCreditCardExpireMonth =
"11"'ObjADORecordSet4.Fields("APCreditCardExpireMonth").value
parAPCreditCardExpireYear =
"2019"'ObjADORecordSet4.Fields("APCreditCardExpireYear").value
parAPCCCounter = ""
parDestCounter = ""
parAPMCOAccNum = ""
parAPCostCentDetailsAmt = ""
parAPCostCentCode = ""
parAPCheqNum =
"123456"'ObjADORecordSet4.Fields("APCheqNum").value
parAPCheqDate = Cstr(Day(Now)&"-"&MonthName(Month(Now),True)
&"-"& Year(Now))'ObjADORecordSet4.Fields("APCheqDate").value
parAPCheqBankName =
"ICICI"'ObjADORecordSet4.Fields("APCheqBankName").value
parNegDiscount = "NO"
'parExecution_Status =
ObjADORecordSet4.Fields("Execution_Progress").value
parMulti_Leg = "NO"
parFlightNum = x(1)
parFlightDate = x(2)
If UCASE(parMulti_Leg) = "YES" Then
ParNoOfConnections =
Cint(ObjADORecordSet4.Fields("No_Of_Connections").value)
ParConnections =
(ObjADORecordSet4.Fields("Connections").value)
Else
ParNoOfConnections = 0
parArrLocation = parDesStation
End If
parArrLocation = CityName(parArrLocation)
If UCASE(parNegDiscount) = "NO" Then
parNegDiscountApplied = "NOT APPLIED"
parPartialAdhoc = "NOT APPROVED"
Else
parNegDiscountApplied =
ObjADORecordSet4.Fields("NegDiscountApplied").value
parPartialAdhoc =
UCASE(ObjADORecordSet4.Fields("PartialAdhoc").value)
End If
If (parExecute_SubModule = "AWB FINALIZATION" OR
parExecute_SubModule = "POD CAPTURE") and (parNegDiscountApplied <> "NOT APPLIED"
or Ucase(parNegDiscount) = "NO" or parPartialAdhoc = "NOT APPROVED") Then
' 'Call
BC_AWB0001_CustomClearance_Destination(parSourceStation,parDesStation)
Call BC_ChangeCITYandSTATION(parArrLocation)
Call
BC1_AWB0001_RESandBOOKINGForm_LaunchScreenCode("GHO0001")
Call
BC1_GHO0001_ShipmentDelivery_AWBFinalizationAWD(x(1),x(2))
'Call
gf_UpdateRecordsInDataSheet(ObjADORecordSet4,"Execution_Progress",parExecution_Stat
us&" --> AWB Finalization")
If parExecute_SubModule = "DELIVERY FLIGHT" or
parExecute_SubModule = "POD CAPTURE" Then
Call
BC_AWB0001_HandlingandRating_AGT_CC_FOPs(parCreditPartyAccount_Dest,parCardType,par
Amount,parAPCreditCardNum,parAPCreditCardExpireMonth,parAPCreditCardExpireYear,parD
estCounter,parAPMCOAccNum,parAPCostCentDetailsAmt,parAPCostCentCode,parAPCheqNum,pa
rAPCheqDate,parAPCheqBankName)
Call
BC_GHO0001_ShipmentDelivery_DeliveryOrder(parFlightNum,parFlightDate)
Call
BC3_GHO0001_ShipmentDelivery_DeliverySlip(parFlightNum)
' parExecution_Status =
ObjADORecordSet4.Fields("Execution_Progress").value
' Call
gf_UpdateRecordsInDataSheet(ObjADORecordSet4,"Execution_Progress",parExecution_Stat
us&" --> Delivered Slip '"+intExpDelSlipNum+"' ")
If (parExecute_SubModule = "POD CAPTURE") Then
Call BC4_GHO0001_ShipmentDelivery_CapturePOD()
' parExecution_Status =
ObjADORecordSet4.Fields("Execution_Progress").value
' Call
gf_UpdateRecordsInDataSheet(ObjADORecordSet4,"Execution_Progress",parExecution_Stat
us&" --> POD Captured")
' Call
BC1_AWB0001_RESandBOOKINGForm_LaunchScreenCode("CSH0008")
' Call
BC_CSH0008_END_ISRClosure(parArrLocation,parFlightDate,parDestCounter)
End If
End If
End If

Next

';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22222222222222222222222222222222222222222222
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@2
2
AWB_V = Split(AWB_Value,";")
For i = 0 To Ubound(AWB_V)
x = Split(AWB_V(i),":")
parExecute_SubModule = "POD CAPTURE"
parChargeCode = "CC"
ParCarrierCode = "UA"
parAirwayBillCode = x(0)
parSourceStation = ""
parLocation = ""
parAccountID = ""
parArrLocation = x(5)
parSourceStation = x(4)
parDesStation = x(5)
parPaymentOption = "Cash"
parCreditPartyAccount_Dest = ""
parAmount = ""
parCardType = "VISA"'ObjADORecordSet4.Fields("CardType").value
parAPCreditCardNum =
"444555566667777"'ObjADORecordSet4.Fields("APCreditCardNum").value
parAPCreditCardExpireMonth =
"11"'ObjADORecordSet4.Fields("APCreditCardExpireMonth").value
parAPCreditCardExpireYear =
"2019"'ObjADORecordSet4.Fields("APCreditCardExpireYear").value
parAPCCCounter = ""
parDestCounter = ""
parAPMCOAccNum = ""
parAPCostCentDetailsAmt = ""
parAPCostCentCode = ""
parAPCheqNum =
"123456"'ObjADORecordSet4.Fields("APCheqNum").value
parAPCheqDate = Cstr(Day(Now)&"-"&MonthName(Month(Now),True)
&"-"& Year(Now))'ObjADORecordSet4.Fields("APCheqDate").value
parAPCheqBankName =
"ICICI"'ObjADORecordSet4.Fields("APCheqBankName").value
parNegDiscount = "NO"
'parExecution_Status =
ObjADORecordSet4.Fields("Execution_Progress").value
parMulti_Leg = "NO"
parFlightNum = x(1)
parFlightDate = x(2)
If UCASE(parMulti_Leg) = "YES" Then
ParNoOfConnections =
Cint(ObjADORecordSet4.Fields("No_Of_Connections").value)
ParConnections =
(ObjADORecordSet4.Fields("Connections").value)
Else
ParNoOfConnections = 0
parArrLocation = parDesStation
End If
parArrLocation = parDesStation
parArrLocation = CityName(parArrLocation)
If UCASE(parNegDiscount) = "NO" Then
parNegDiscountApplied = "NOT APPLIED"
parPartialAdhoc = "NOT APPROVED"
Else
parNegDiscountApplied =
ObjADORecordSet4.Fields("NegDiscountApplied").value
parPartialAdhoc =
UCASE(ObjADORecordSet4.Fields("PartialAdhoc").value)
End If
' If (parExecute_SubModule = "AWB FINALIZATION" OR
parExecute_SubModule = "POD CAPTURE") and (parNegDiscountApplied <> "NOT APPLIED"
or Ucase(parNegDiscount) = "NO" or parPartialAdhoc = "NOT APPROVED") Then
' 'Call
BC_AWB0001_CustomClearance_Destination(parSourceStation,parDesStation)
Call BC_ChangeCITYandSTATION(parArrLocation)
Call
BC1_AWB0001_RESandBOOKINGForm_LaunchScreenCode("GHO0001")
' JavaWindow("UnitedCargo-360(QA2) -
Home").JavaButton("jBtn_Clear").Click
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaEdit("jEdit_AirWayBill_GHO").Set parAirwayBillCode
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaButton("jBtn_SD_Search").Click
JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTab("jTab_OpenScreenReport:").Select "Delivery Slip / Release Note
details"
wait 2
intRowCount=JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_SD_CargoDelInfo").GetROProperty("rows")
For j=0 To intRowCount-1
intDelSlipNum=Cstr(JavaWindow("UnitedCargo-360(QA2) -
Home").JavaTable("jTable_SD_CargoDelInfo").GetCellData(j,21))

Next
Print parAirwayBillCode & ":" &intDelSlipNum
intDelSlipNum= ""
' Call
BC1_GHO0001_ShipmentDelivery_AWBFinalizationAWD(x(1),x(2))
' 'Call
gf_UpdateRecordsInDataSheet(ObjADORecordSet4,"Execution_Progress",parExecution_Stat
us&" --> AWB Finalization")
' If parExecute_SubModule = "DELIVERY FLIGHT" or
parExecute_SubModule = "POD CAPTURE" Then
' Call
BC_AWB0001_HandlingandRating_AGT_CC_FOPs(parCreditPartyAccount_Dest,parCardType,par
Amount,parAPCreditCardNum,parAPCreditCardExpireMonth,parAPCreditCardExpireYear,parD
estCounter,parAPMCOAccNum,parAPCostCentDetailsAmt,parAPCostCentCode,parAPCheqNum,pa
rAPCheqDate,parAPCheqBankName)
' Call
BC_GHO0001_ShipmentDelivery_DeliveryOrder(parFlightNum,parFlightDate)
' Call
BC3_GHO0001_ShipmentDelivery_DeliverySlip(parFlightNum)
' parExecution_Status =
ObjADORecordSet4.Fields("Execution_Progress").value
' Call
gf_UpdateRecordsInDataSheet(ObjADORecordSet4,"Execution_Progress",parExecution_Stat
us&" --> Delivered Slip '"+intExpDelSlipNum+"' ")
' If (parExecute_SubModule = "POD CAPTURE") Then
' Call BC4_GHO0001_ShipmentDelivery_CapturePOD()
'' parExecution_Status =
ObjADORecordSet4.Fields("Execution_Progress").value
'' Call
gf_UpdateRecordsInDataSheet(ObjADORecordSet4,"Execution_Progress",parExecution_Stat
us&" --> POD Captured")
'' Call
BC1_AWB0001_RESandBOOKINGForm_LaunchScreenCode("CSH0008")
'' Call
BC_CSH0008_END_ISRClosure(parArrLocation,parFlightDate,parDestCounter)
' End If
' End If
' End If

Next

' print JavaWindow("UnitedCargo-360(QA2) -


Home").JavaTable("jTable_SD_CargoDelInfo").GetCellData(0,21)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy