Advertisement
Guest User

Untitled

a guest
Jul 21st, 2015
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 116.92 KB | None | 0 0
  1. ///$tab Main
  2. SET ThousandSep=',';
  3. SET DecimalSep='.';
  4. SET MoneyThousandSep=',';
  5. SET MoneyDecimalSep='.';
  6. SET MoneyFormat='$#,##0.00;($#,##0.00)';
  7. SET TimeFormat='h:mm:ss TT';
  8. SET DateFormat='DD-MM-YYYY';
  9. SET TimestampFormat='DD-MM-YYYY hh:mm:ss';
  10. SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';
  11. SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';
  12.  
  13. $(include=C:\QlikviewFiles\Properties\DataPath.txt)
  14.  
  15. LET RELOAD_VOLUME = 12;
  16. LET RELOAD_VOLUME_FACT = 13;
  17.  
  18. //LET MP_CUTOFF_TIME = 9;
  19.  
  20.  
  21.  
  22. ///$tab Mappings
  23. ekl_workday_map:
  24. Mapping LOAD
  25. date,
  26. dateno
  27. FROM
  28. [$(qvdPath_excel)ekl_workday_map_weekly.xls]
  29. (biff, embedded labels, table is Sheet1$);
  30.  
  31. mp_fkl_mh:
  32. Mapping Load * Inline [
  33. id, MH_name
  34. 1, Blr_MH
  35. 3, Del_MH
  36. 5, Mum_MH
  37. ];
  38.  
  39. mp_pickup_hub:
  40. Mapping LOAD id as mp_hub_id,
  41. name as mp_hub_name
  42. FROM
  43. [$(qvdPath_proc)proc_procurement_facilities.qvd]
  44. (qvd);
  45.  
  46. hubid_hubname_mapping:
  47. mapping LOAD id as hubId,
  48. upper(name) as hubname
  49. FROM
  50. [$(qvdPath_ekl_facility)ekl_facilities_facilities.qvd]
  51. (qvd);
  52.  
  53. hubid_fsd_HubType_mapping:
  54. mapping LOAD id as hubId,
  55. type as fsd_HubType
  56. FROM
  57. [$(qvdPath_ekl_facility)ekl_facilities_facilities.qvd]
  58. (qvd);
  59.  
  60. day_map:
  61. Mapping LOAD
  62. date,
  63. dateno
  64. FROM
  65. [$(qvdPath_excel)workday_map.xls]
  66. (biff, embedded labels, table is Sheet1$);
  67.  
  68.  
  69. hub_city_map:
  70. Mapping LOAD
  71. Destination as hub,
  72. [Destination City] as hub_city
  73. FROM
  74. [$(qvdPath_excel)Final Map v3.xlsx]
  75. (ooxml, embedded labels, table is Route);
  76.  
  77. hub_zone_map:
  78. Mapping LOAD Destination as hub,
  79. [Destination Zone] as hub_zone
  80. FROM
  81. [$(qvdPath_excel)Final Map v3.xlsx]
  82. (ooxml, embedded labels, table is Route);
  83.  
  84.  
  85. class_mapping:
  86. Mapping LOAD City,
  87. Class
  88. FROM
  89. [$(qvdPath_excel)EKL_Class_Mapping.xlsx]
  90. (ooxml, embedded labels, table is Sheet1);
  91.  
  92. hubid_hubname_mapping:
  93. mapping LOAD [Destination Hub Id] as hubId,
  94. Destination as hubname
  95. FROM
  96. [$(qvdPath_excel)Final Map v3.xlsx]
  97. (ooxml, embedded labels, table is Route);
  98.  
  99.  
  100. connection_mapping:
  101. Mapping LOAD
  102. Key_2,
  103. [Conn. Type]
  104. FROM
  105. [$(qvdPath_excel)Final Map v3.xlsx]
  106. (ooxml, embedded labels, table is Route);
  107.  
  108. fsd_status_mapping:
  109. Mapping LOAD statusId,
  110. statusDescription
  111. FROM
  112. [$(qvdPath_fkl)fkl_status.qvd]
  113. (qvd);
  114.  
  115. //hub_holiday_mapping:
  116. //Mapping LOAD hub_city,
  117. // holiday
  118. //FROM
  119. //[$(qvdPath_excel)EKL_HUB_Holiday.xlsx]
  120. //(ooxml, embedded labels, table is Sheet1);
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132. ///$tab Fact Reload
  133. shipmentFact:
  134. Load distinct upper(vendor_tracking_id) as tracking_id,
  135. merchant_reference_id,
  136. cost_of_breach,
  137. weight as shipmentWeight,
  138. shipment_value,
  139. delivery_type,
  140. carrier,
  141. ekl_shipment_type_ekl_db,
  142. If(isnull(fkl_delivery_datetime) , end_state_datetime,fkl_delivery_datetime) as fkl_delivery_datetime,
  143. if(cost_of_breach<100,'Normal',if(cost_of_breach<1000,'NDD Pilot',if(cost_of_breach<15000,'NDD',if(cost_of_breach<20000,'SDD Pilot',if(cost_of_breach>=20000,'SDD','Normal'))))) as order_priority_flag
  144.  
  145. FROM
  146. [$(qvdPath_fkl)fkl_shipment_fact.qvd]
  147. (qvd)
  148. where floor(created_at) >= floor(today()-$(RELOAD_VOLUME_FACT));
  149.  
  150. left join(shipmentFact)
  151. LOAD distinct shipmentId as tracking_id,
  152. // NZL,
  153. // fsd_numberOfAttempts,
  154. // fsd_first_received_datetime,
  155. // fsd_first_DH_received_datetime,
  156. // fsd_first_received_hubId,
  157. fsd_first_DH_hubId,
  158. fsd_first_DH_received_datetime,
  159. shipment_lastBagId as fsd_shipment_last_bagid,
  160. ApplyMap('hubid_fsd_HubType_mapping',fsd_last_received_hubId,null()) as fsd_last_hub_type,
  161. fsd_last_expected_datetime,
  162. fsd_last_received_datetime as fsd_last_receive_datetime,
  163. fsd_last_received_hubId as fsd_last_hub_id,
  164. floor(fsd_delivery_datetime) as ekl_delivery_date,
  165. fsd_delivery_datetime as ekl_delivery_datetime,
  166. fsd_current_status,
  167. shipment_lastConsignmentId as fsd_shipment_lastConsignmentId,
  168. fsd_first_OFD_datetime,
  169. fsd_last_OFD_datetime
  170. // fsd_first_OFD_datetime-fsd_first_DH_received_datetime as recToOFDTIme
  171. //fsd_shipment_flag
  172. FROM
  173. [$(qvdPath_fsd)fsd_shipment_fact.qvd](qvd);
  174. //where Timestamp(fsd_first_OFD_datetime) >= Timestamp(today()-$(RELOAD_VOLUME_FACT));
  175.  
  176. left join(shipmentFact)
  177. LOAD distinct consignmentId as fsd_shipment_lastConsignmentId,
  178. consignment_receive_datetime as fsd_consignment_receive_datetime
  179.  
  180. FROM
  181. [$(qvdPath_fsd)fsd_consignment_facts.qvd]
  182. (qvd);
  183.  
  184. left join(shipmentFact)
  185. LOAD statusId as fsd_current_status,
  186. statusTypeId as fsd_current_status_typeId,
  187. statusCode as fsd_current_status_code,
  188. statusDescription as fsd_current_status_desc
  189. FROM
  190. [$(qvdPath_fkl)fkl_status.qvd]
  191. (qvd);
  192.  
  193. left join(shipmentFact)
  194. LOAD upper(shipmentId) as tracking_id,
  195. flagType as fsd_shipment_flag
  196. FROM
  197. [$(qvdPath_fsd)fsd_shipmentFlag.qvd]
  198. (qvd);
  199.  
  200. left join(shipmentFact)
  201. LOAD distinct [Destination Hub Id] as fsd_last_hub_id,
  202. //Destination as fsd_destinationHub,
  203. upper([Destination City]) as fsd_last_City
  204. FROM
  205. [$(qvdPath_excel)Final Map v3.xlsx]
  206. (ooxml, embedded labels, table is Route);
  207.  
  208. left join(shipmentFact)
  209. LOAD distinct City as fsd_last_City,
  210. // State,
  211. Holiday_Date as holiday_dh_date,
  212. Holidays as holidays
  213. FROM
  214. [$(qvdPath_excel)EKL_HUB_Holiday_Weekly.xlsx]
  215. (ooxml, embedded labels, table is Sheet1);
  216.  
  217. //exit script;
  218.  
  219.  
  220. left join(shipmentFact)
  221. LOAD distinct bagId as fsd_shipment_last_bagid,
  222. bagDestHubId as fsd_shipment_last_bag_receive_hubid,
  223. ApplyMap('hubid_fsd_HubType_mapping',bagDestHubId,null()) as fsd_shipment_last_bag_receive_type,
  224. bagFinalReachedDateTime as fsd_shipment_last_bag_receive_datetime
  225. FROM
  226. [$(qvdPath_fsd)fsd_bag_facts.qvd]
  227. (qvd)
  228. where bagAssignedHubId=bagDestHubId;
  229.  
  230. shipmentFact1:
  231. NoConcatenate
  232. Load *,
  233. If(fsd_shipment_last_bag_receive_type='DELIVERY_HUB' and fsd_last_hub_type='DELIVERY_HUB'and fsd_last_expected_datetime<=fsd_shipment_last_bag_receive_datetime,
  234. fsd_shipment_last_bag_receive_datetime,if(fsd_last_hub_type='DELIVERY_HUB',fsd_last_receive_datetime)) as fsd_last_dh_receive_datetime,
  235. if(fsd_last_hub_type='DELIVERY_HUB',fsd_last_hub_id) as fsd_last_dh_id
  236. // if(fsd_last_hub_type='DELIVERY_HUB',ApplyMap('hub_holiday_mapping',fsd_last_City)) as holiday_dh_date
  237.  
  238. Resident shipmentFact;
  239.  
  240. //exit script;
  241.  
  242. drop table shipmentFact;
  243.  
  244. shipmentFact2:
  245. NoConcatenate
  246. Load *,
  247. //if(floor(holiday_dh_date)>=floor(fsd_last_dh_receive_datetime) and floor(holiday_dh_date)<=floor(ekl_delivery_date),1,0) as holiday_dh_flag,
  248. if(floor(holiday_dh_date)>=floor(fsd_last_dh_receive_datetime) and floor(holiday_dh_date)<=floor(ekl_delivery_date),holidays,0) as holiday_dh_flag,
  249. DayName(fsd_last_dh_receive_datetime) as fsd_last_dh_receive_date,
  250. if(match(fsd_last_hub_id,54,145,134,86,462,148,55,95,177,199,628,204,188,173,158,490,481,482,110,1337,1338,178,641,636,258,234,201,235,1363,613,1362,1367,118,109,174,163,113,146,192,114,250,495,503,65,637,100,583,193,233,195,241,584,1361,78,106,414,168,175, 196, 77, 248, 94, 287, 640, 726, 1385, 212, 720, 151),
  251. if(fsd_last_dh_receive_datetime-floor(fsd_last_dh_receive_datetime)>'8:00:00',fsd_last_dh_receive_datetime+1,fsd_last_dh_receive_datetime),
  252. // if(match(fsd_last_hub_id,54,86,462,148,55,95,177,199,628,204,188,173,158,490,481,482,110,1337,1338,178,641,636,258,234,201,235,1363,613,1362,1367,118,109,174,163,113,146,192,114,250,495,503,65,637,100,583,193,233,195,241,584,1361,78,106,414,168,175, 196, 77, 248, 94, 287, 640, 726, 1385, 212, 720, 151),
  253. // if(fsd_last_dh_receive_datetime-floor(fsd_last_dh_receive_datetime)>'8:00:00',fsd_last_dh_receive_datetime+1,fsd_last_dh_receive_datetime),if(fsd_last_dh_receive_datetime-floor(fsd_last_dh_receive_datetime)>'12:00:00',fsd_last_dh_receive_datetime+1,fsd_last_dh_receive_datetime))) as fsd_last_dh_receive_adjusted_datetime,
  254. if(fsd_last_dh_receive_datetime-floor(fsd_last_dh_receive_datetime)>'12:00:00',fsd_last_dh_receive_datetime+1,fsd_last_dh_receive_datetime)) as fsd_last_dh_receive_adjusted_datetime,
  255. Applymap('ekl_workday_map',Dayname(If(ekl_delivery_datetime-floor(ekl_delivery_datetime)<0.125,ekl_delivery_date-1,ekl_delivery_date))) as ekl_delivery_indays_adjusted
  256. Resident shipmentFact1;
  257.  
  258. //exit Script;
  259. drop table shipmentFact1;
  260.  
  261. shipmentFact:
  262. NoConcatenate
  263. Load *,
  264. if(fsd_last_hub_type='DELIVERY_HUB',
  265. if(IsNull(ekl_delivery_date),if(DayName(fsd_last_dh_receive_adjusted_datetime)=Today() or (DayName(fsd_last_dh_receive_adjusted_datetime)=today()-1 and today()=weekstart(today())),'Pending After 3',
  266. 'Pending_'&(today()-Floor(fsd_last_dh_receive_adjusted_datetime))&'_days'),
  267. if(WeekDay(fsd_last_dh_receive_adjusted_datetime)=6,ekl_delivery_indays_adjusted-ApplyMap('ekl_workday_map',DayName(fsd_last_dh_receive_adjusted_datetime))-holiday_dh_flag-1,
  268. ekl_delivery_indays_adjusted-ApplyMap('ekl_workday_map',DayName(fsd_last_dh_receive_adjusted_datetime))-holiday_dh_flag)),'Still at MH') as Dh_delivery_indays,
  269. dayname(fsd_last_dh_receive_adjusted_datetime) as fsd_last_dh_receive_adjusted_date
  270.  
  271. resident shipmentFact2;
  272.  
  273. drop table shipmentFact2;
  274.  
  275. //exit script;
  276. //left join(shipmentFact)
  277. //Load upper(vendor_tracking_id) as tracking_id,
  278. // merchant_reference_id,
  279. // cost_of_breach,
  280. // weight as shipmentWeight,
  281. // shipment_value,
  282. // delivery_type,
  283. // carrier,
  284. // ekl_shipment_type_ekl_db,
  285. // If(isnull(fkl_delivery_datetime) , end_state_datetime,fkl_delivery_datetime) as fkl_delivery_datetime
  286. //
  287. //FROM
  288. //[$(qvdPath_fkl)fkl_shipment_fact.qvd]
  289. //(qvd)
  290. //where floor(created_at) >= floor(today()-$(RELOAD_VOLUME_FACT));
  291.  
  292. left join(shipmentFact)
  293. Load
  294. distinct unit_tracking_id as tracking_id,
  295. //Item_amount,
  296. order_item_id,
  297. product_id,
  298. unit_quantity,
  299. final_adjusted_amount as order_item_value,
  300. unit_status
  301. //unit_tracking_id&order_item_id as keyShip
  302. //sku
  303. FROM
  304. [$(qvdPath_common)Fact_table.qvd]
  305. (qvd)
  306. where floor(dispatch_date) >= floor(today()-$(RELOAD_VOLUME));
  307.  
  308. left join(shipmentFact)
  309. Load
  310. distinct product_id ,
  311. title_product_info,
  312. sub_category,
  313. super_category,
  314. vertical,
  315. category,
  316. anlt_cluster
  317. FROM
  318. [$(qvdPath_common)Product_InfoMP.qvd]
  319. (qvd);
  320.  
  321.  
  322. //left join(fkl_shipments)
  323. flo_shipments:
  324. LOAD Distinct display_id as merchant_reference_id,
  325. used_packing_box_id as warehouse_packing_box_id
  326. FROM
  327. [$(qvdPath_flo_warehouse_b2c)flo_warehouse_b2c_shipments.qvd]
  328. (qvd);
  329. Concatenate(flo_shipments)
  330. LOAD Distinct display_id as merchant_reference_id,
  331. used_packing_box_id as warehouse_packing_box_id
  332. FROM
  333. [$(qvdPath_flo_warehouse_b2b)flo_warehouse_b2b_shipments.qvd](qvd);
  334.  
  335. left join(shipmentFact)
  336. Load merchant_reference_id,
  337. warehouse_packing_box_id
  338. resident flo_shipments ;
  339.  
  340. drop table flo_shipments;
  341.  
  342. warehouse_packing_box:
  343. LOAD Distinct id as warehouse_packing_box_id,
  344. length as warehouse_pb_length,
  345. breadth as warehouse_pb_breadth,
  346. height as warehouse_pb_height,
  347. (length*breadth*height)/366 as shipment_volumetricWeight
  348. FROM
  349. [$(qvdPath_flo_warehouse_b2c)flo_warehouse_b2c_packing_boxes.qvd]
  350. (qvd);
  351.  
  352. Concatenate(warehouse_packing_box)
  353. LOAD Distinct id as warehouse_packing_box_id,
  354. length as warehouse_pb_length,
  355. breadth as warehouse_pb_breadth,
  356. height as warehouse_pb_height,
  357. (length*breadth*height)/366 as shipment_volumetricWeight
  358. FROM
  359. [$(qvdPath_flo_warehouse_b2b)flo_warehouse_b2b_packing_boxes.qvd]
  360. (qvd);
  361.  
  362. left join(shipmentFact)
  363. Load warehouse_packing_box_id,
  364. shipment_volumetricWeight
  365. resident warehouse_packing_box;
  366.  
  367. //left join(fkl_shipments)
  368. //LOAD Distinct id as warehouse_packing_box_id,
  369. // (length*breadth*height)/366 as shipment_volumetricWeight
  370. //FROM
  371. //[$(qvdPath_flo_warehouse_b2c)flo_warehouse_b2c_packing_boxes.qvd]
  372. //(qvd);
  373.  
  374. //exit script;
  375.  
  376. drop table warehouse_packing_box;
  377.  
  378. left join(shipmentFact)
  379. Load Distinct tracking_id,
  380. if(shipmentWeight>shipment_volumetricWeight,shipmentWeight,shipment_volumetricWeight) as shipmentChargeableWeightRaw
  381. Resident shipmentFact;
  382.  
  383. left join(shipmentFact)
  384. Load Distinct tracking_id,
  385. if(shipmentChargeableWeightRaw>20,0.5,shipmentChargeableWeightRaw) as shipmentChargeableWeight
  386. Resident shipmentFact;
  387.  
  388. left join(shipmentFact)
  389. Load Distinct tracking_id,
  390. if(isnull(shipmentChargeableWeight),0.5,shipmentChargeableWeight) as shipmentChargeableWeightFinal
  391. Resident shipmentFact;
  392.  
  393. //exit script;
  394. ///$tab Agent/Hub
  395. //ODBC CONNECT TO facilities;
  396. DayDetails:
  397. Load date as Date,
  398. // date as DateRec,
  399. //day_date as fsd_last_dh_receive_adjusted_day,
  400. week_date as Week,
  401. month_date as Month,
  402. year_date as Year,
  403. if (DayName(date)=DayName(Today(1)-1),1,0) as varForYesterday,
  404. if (DayName(date)=DayName(Today(1)-4),1,0) as posFraudDateSelection,
  405. if (DayName(date)=DayName(Today(1)-1),1,0) as mp_varForYesterday,
  406. if (DayName(date)<DayName(Today(1)-2) and DayName(date)>DayName(41852),1,0) as dateSelectionPOS
  407. FROM [$(qvdPath_common)date_calendar.qvd](qvd)
  408. where Timestamp(date) >= Timestamp(today()-$(RELOAD_VOLUME));
  409.  
  410. Agents:
  411. LOAD
  412. //`facility_id` as fsd_HubId,
  413. id as runAgentId,
  414. upper(first_name) as runAgentName,
  415. if(Right(first_name,2)='PL',upper(left(first_name,len(first_name)-3)),upper(first_name)) as runAgentNameFinal,
  416. employee_id as FHRId,
  417. active as isFEActive,
  418. created_at as FEJoiningDate
  419. //Right(display_name,len(display_name)-Index(display_name,'_',-1)) as FHRId
  420. //TextBetween( first_name&':','_',':',3) as FHRId,
  421. //Lookup('isVan','AgentId',id,'VanNotBike') as validVan,
  422. //Lookup('istlhl','fhrid',TextBetween( first_name&':','_',':',3),'Tl_HI') as validMan
  423. FROM
  424. [$(qvdPath_ekl_facility)ekl_facilities_agents.qvd]
  425. (qvd)
  426. where active=1;
  427.  
  428.  
  429. //Agents:
  430. //NoConcatenate
  431. //Load *,
  432. // Right(runAgentNameFinal,len(runAgentNameFinal)-Index(runAgentNameFinal,'_',-1)) as FHRId
  433. // //if(Right(runAgentName,2)='PL',left(runAgentName,len(runAgentName)-2),runAgentName) as runAgentNameFinal`
  434. //Resident Agents1;
  435.  
  436. //drop table Agents1;
  437. left join(Agents)
  438. LOAD
  439. facility_id as fsd_HubId,
  440. agent_id as runAgentId ,
  441. active as isFAMAcitve
  442. FROM
  443. [$(qvdPath_ekl_facility)ekl_facility_agent_mappings.qvd]
  444. (qvd)
  445. where active=1;
  446.  
  447. //ODBC CONNECT TO fklogistics;
  448. Run_Agents:
  449. NoConcatenate
  450. //left keep(Runsheet)
  451. Load runAgentId,
  452. FHRId,
  453. runAgentName,
  454. runAgentNameFinal,
  455. isFEActive,
  456. isFAMAcitve,
  457. if(isnull(fsd_HubId),'Hub not mapped',fsd_HubId) as fsd_HubId,
  458. FEJoiningDate
  459. Resident Agents;
  460. //Exit Script;
  461. left join(Run_Agents)
  462. LOAD
  463. facility_id as fsd_HubId,
  464. value as fsd_loc_code
  465. FROM
  466. [$(qvdPath_ekl_facility)ekl_facilities_facility_attributes.qvd](qvd)
  467. where upper(name)='LOCATION_CODE';
  468.  
  469. //exit script;
  470.  
  471. Run_Agents_Date1:
  472. NoConcatenate
  473. Load distinct FHRId,
  474. 1 as join
  475. Resident Run_Agents ;
  476.  
  477. left join(Run_Agents_Date1)
  478. Load Date,
  479. //day_date as fsd_last_dh_receive_adjusted_day,
  480. //week_date as Week,
  481. //month_date as Month,
  482. //year_date as Year,
  483. //if (DayName(date)=DayName(Today(1)-1),1,0) as varForYesterday,
  484. //if (DayName(date)=DayName(Today(1)-1),1,0) as mp_varForYesterday,
  485. 1 as join
  486. Resident DayDetails;
  487. //FROM [$(qvdPath_common)date_calendar.qvd](qvd)
  488. //where Timestamp(date) >= Timestamp(today()-$(RELOAD_VOLUME));
  489.  
  490.  
  491. left keep(Run_Agents)
  492. left keep(DayDetails)
  493. Run_Agents_Date:
  494. //NoConcatenate
  495. Load *, FHRId&Date as key
  496. resident Run_Agents_Date1;
  497.  
  498. drop table Run_Agents_Date1;
  499.  
  500. Hub:
  501. left Keep(Run_Agents)
  502. LOAD id as fsd_HubId,
  503. //upper(type) as fsd_HubType,
  504. upper(name) as fsd_HubName
  505. FROM
  506. [$(qvdPath_ekl_facility)ekl_facilities_facilities.qvd](qvd);
  507. //where UPPER(type)='DELIVERY_HUB' or UPPER(type)='PICKUP_HUB';
  508.  
  509. left join(Hub)
  510. LOAD
  511. facility_id as fsd_HubId,
  512. value as fsd_loc_code
  513. FROM
  514. [$(qvdPath_ekl_facility)ekl_facilities_facility_attributes.qvd](qvd)
  515. where upper(name)='LOCATION_CODE';
  516.  
  517. left join(Hub)
  518. LOAD distinct upper([Destination Hub Id]) as fsd_HubId,
  519. //Destination as fsd_destinationHub,
  520. upper([Destination City]) as fsd_City,
  521. upper([Ops Zone]) as fsd_Zone,
  522. upper([Destination City/State]) as fsd_State,
  523. upper([Hub Type]) as fsd_HubType
  524.  
  525. FROM
  526. [$(qvdPath_excel)Final Map v3.xlsx]
  527. (ooxml, embedded labels, table is Route);
  528.  
  529. run_Hub:
  530. NoConcatenate
  531. Load fsd_HubId,
  532. fsd_HubType,
  533. fsd_loc_code,
  534. fsd_HubName,
  535. // if(isnull(fsd_destinationHub),'Hub not mapped',fsd_destinationHub) as fsd_destinationHub,
  536. if(isnull(fsd_City),'City not mapped',fsd_City) as fsd_City,
  537. if(isnull(fsd_Zone),'Zone not mapped',fsd_Zone) as fsd_Zone,
  538. if(isnull(fsd_State),'Zone not mapped',fsd_State) as fsd_State
  539. Resident Hub;
  540. Drop Table Hub;
  541.  
  542. //exit script;
  543.  
  544. //left join(run_Hub)
  545. //LOAD
  546. // [Hub Id] as fsd_HubId,
  547. // Count as devicesAssigned,
  548. // '1' as inSmartProject1
  549. //FROM
  550. //[$(qvdPath_excel)Hub_Device_Count.xlsx]
  551. //(ooxml, embedded labels, table is Sheet1);
  552.  
  553. //run_Hub2:
  554. //NoConcatenate
  555. //Load distinct fsd_HubId,
  556. // fsd_City,
  557. // devicesAssigned
  558. //resident run_Hub;
  559. //group by fsd_City;
  560.  
  561. //left join(run_Hub)
  562. //Load fsd_City,
  563. // sum( devicesAssigned) as devicesAssignedCity
  564. //resident run_Hub2
  565. //group by fsd_City ;
  566.  
  567. //left join(run_Hub)
  568. //LOAD [Hub Id] as fsd_HubId,
  569. // //[Hub Name],
  570. // [MP Vans] as mp_vans
  571. //FROM
  572. //[$(qvdPath_excel)MP_Vans_Hub.xlsx]
  573. //(ooxml, embedded labels, table is Sheet1);
  574.  
  575. left keep(run_Hub)
  576. POSHubMap:
  577. LOAD
  578. hubId as fsd_HubId,
  579. posId as posDevicesAssignedId
  580. FROM
  581. [$(qvdPath_fsd)fsd_POS_Hub_Mapping.qvd]
  582. (qvd);
  583.  
  584. left join(POSHubMap)
  585. LOAD posId as posDevicesAssignedId,
  586. serial as posSerialAssignedId,
  587. merchantId as posMerchantAssignedId,
  588. provider as posVendorNameAssignedId,
  589. status as posVendorStatusAssigned
  590. FROM
  591. [$(qvdPath_fsd)fsd_posDevice.qvd](qvd);
  592.  
  593. left keep(POSHubMap)
  594. Load dateOfTransaction as dateOfTransactionMIS,
  595. if (DayName(dateOfTransaction)=DayName(Today(1)-4),1,0) as posFraudDateSelectionMIS,
  596. terminalId as posSerialAssignedId,
  597. sum(amount) as amountPOSMIS
  598. FROM [$(qvdPath_fsd)fsd_posBankTransaction.qvd](qvd)
  599. group by dateOfTransaction,terminalId ;
  600.  
  601.  
  602.  
  603. //drop table run_Hub2;
  604.  
  605. left join(run_Hub)
  606. Load * inline
  607. [fsd_HubId, inVolumetricProject
  608. 209,1
  609. 4,1
  610. 56,1
  611. 90,1
  612. 226,1
  613. 11,1
  614. 57,1
  615. 202,1
  616. 220,1
  617. 194,1
  618. 3,1
  619. 29,1
  620. 239,1
  621. 32,1
  622. 152,1
  623. 243,1
  624. 89,1
  625. 38,1
  626. ];
  627.  
  628. left join(run_Hub)
  629. Load * inline
  630. [fsd_City, inVanReport
  631. KANCHIPURAM,1
  632. BENGALURU,1
  633. PONDICHERRY,1
  634. KOLKATA,1
  635. JAIPUR,1
  636. KHARAGPUR,1
  637. TRICHY,1
  638. HYDERABAD,1
  639. AHMEDABAD,1
  640. INDORE,1
  641. PATNA,1
  642. BHOPAL,1
  643. COCHIN,1
  644. DELHI NCR,1
  645. GOA,1
  646. CHENNAI,1
  647. COIMBATORE,1
  648. MUMBAI,1
  649. NAVI MUMBAI,1
  650. PUNE,1
  651. GUWAHATI,1
  652. VISHAKHAPATANAM,1
  653. NAGPUR,1
  654. VELLORE,1
  655. KHARAGPUR,1
  656. BHUBANESWAR,1
  657. NEW DELHI,1
  658. GURGAON,1
  659. FARIDABAD,1
  660. MANGALORE,1
  661. MYSORE,1
  662. MANIPAL,1
  663. CHANDIGAR,1H
  664. SURAT,1
  665. BARODA,1
  666. LUCKNOW,1
  667. HUBLI,1
  668. MADURAI,1
  669. ERODE,1
  670. SALEM,1
  671. THANJAVUR,1
  672. GUNTUR,1
  673. NELLORE,1
  674. VIJAYAWADA,1
  675. SILIGURI,1
  676. TIRUPATI,1
  677. RAIPUR,1
  678.  
  679. ];
  680.  
  681.  
  682. left join(run_Hub)
  683. Load * inline
  684. [fsd_City, inTopCity
  685. BENGALURU,1
  686. HYDERABAD,1
  687. CHENNAI,1
  688. MUMBAI,1
  689. NAVI MUMBAI,1
  690. NEW DELHI,1
  691. GURGAON,1
  692. FARIDABAD,1
  693. NOIDA,1
  694. GHAZIABAD,1
  695. PUNE,1
  696. KOLKATA,1
  697. ];
  698.  
  699. left join(run_Hub)
  700. Load * inline
  701. [fsd_City, inTopCityPOS
  702. BENGALURU,1
  703. HYDERABAD,1
  704. CHENNAI,1
  705. MUMBAI,1
  706. NAVI MUMBAI,1
  707. NEW DELHI,1
  708. GURGAON,1
  709. FARIDABAD,1
  710. NOIDA,1
  711. GHAZIABAD,1
  712. PUNE,1
  713. KOLKATA,1
  714.  
  715. ];
  716.  
  717. left join(run_Hub)
  718. Load * inline
  719. [fsd_City, inSmartProject
  720. BENGALURU,1
  721. HYDERABAD,1
  722. CHENNAI,1
  723. MUMBAI,1
  724. NAVI MUMBAI,1
  725. NEW DELHI,1
  726. GURGAON,1
  727. FARIDABAD,1
  728. NOIDA,1
  729. GHAZIABAD,1
  730. PUNE,1
  731. KOLKATA,1
  732. ALLEPPEY,1
  733. COIMBATORE,1
  734. BELGAUM,1
  735. BELLARY,1
  736. DAVANEGERE,1
  737. COCHIN,1
  738. GULBARGA,1
  739. HOSUR,1
  740. HUBLI,1
  741. JAIPUR,1
  742. KOLLAM,1
  743. KOTTAYAM,1
  744. LUDHIANA,1
  745. MANAGALORE,1
  746. MANIPAL,1
  747. MYSORE,1
  748. PALAKKAD,1
  749. SALEM,1
  750. SURAT,1
  751. NAGPUR,1
  752. ];
  753.  
  754. Run_Hub_Final:
  755. NoConcatenate
  756. Load *
  757. resident run_Hub;
  758. //where fsd_HubType='DELIVERY_HUB';
  759. //
  760. ////exit script;
  761. //left join(Run_Hub_Final)
  762. //Load fsd_loc_code,
  763. // fsd_HubId as fsd_pickupHubId
  764. //resident run_Hub
  765. //where fsd_HubType='PICKUP_HUB';
  766. //exit script;
  767.  
  768. //left join(run_Hub)
  769. //Load count(DISTINCT(fsd_HubId)) as shareFacilityNo,
  770. // fsd_loc_code
  771. //resident run_Hub
  772. //Group by fsd_loc_code;
  773. //
  774. //left join(run_Hub)
  775. //Load fsd_loc_code,
  776. // fsd_HubId as fsd_pickupHubId
  777. //resident run_Hub
  778. //where fsd_HubType='PICKUP_HUB';
  779. //
  780. //Run_Hub_Final:
  781. //NoConcatenate
  782. //Load *
  783. //Resident run_Hub
  784. //where shareFacilityNo<>2 or UPPER(fsd_HubType)='DELIVERY_HUB';
  785.  
  786. left keep(Run_Hub_Final)
  787. Run_Hub_Final_LOC:
  788. Load distinct fsd_loc_code,
  789. fsd_HubId as fsd_deliveryHubId
  790. resident Run_Hub_Final
  791. where fsd_HubType='DELIVERY_HUB';
  792.  
  793. left join(Run_Hub_Final_LOC)
  794. Load distinct fsd_loc_code,
  795. fsd_HubId as fsd_pickupHubId
  796. resident Run_Hub_Final
  797. where fsd_HubType='PICKUP_HUB';
  798.  
  799.  
  800.  
  801. drop table run_Hub;
  802.  
  803. drop table Agents;
  804.  
  805. //exit script;
  806.  
  807.  
  808. //load * inline
  809. //[Control
  810. //1
  811. //2
  812. //3];
  813.  
  814.  
  815. ///$tab RunSheet
  816. //ODBC CONNECT TO fklogistics;
  817. posDeviceMap:
  818. LOAD posId,
  819. merchantId as posVendorMid,
  820. provider as posVendorName ,
  821. status as posVendorStatus
  822. FROM
  823. [$(qvdPath_fsd)fsd_posDevice.qvd]
  824. (qvd);
  825.  
  826. smartDeviceMap:
  827. LOAD id as deviceIdSD,
  828. imei as imeiSD,
  829. isActive as isActiveSD,
  830. isBlocked as isBlockedSD,
  831. hubId as fsd_HubId,
  832. imei2 as imei2SD,
  833. deviceTag as deviceTagSD ,
  834. byod as byodSD
  835. FROM
  836. [$(qvdPath_fsd)fsd_Devices.qvd](qvd);
  837.  
  838. left join(smartDeviceMap)
  839. LOAD
  840. deviceId as deviceIdSD,
  841. agentId as agentIdSD,
  842. isActive as isActiveSDMap,
  843. dayname(updateDateTime) as devUpdateDayName
  844. FROM
  845. [$(qvdPath_fsd)fsd_deviceAgentMapping.qvd](qvd);
  846.  
  847. //
  848. //smartDeviceMap:
  849. //NoConcatenate
  850. //Load * , agentIdSD&devUpdateDayName as key
  851. //resident smartDeviceMap0;
  852.  
  853.  
  854.  
  855.  
  856. Runsheet1:
  857. //left keep (posDeviceMap)
  858. LOAD distinct
  859. runsheetId,
  860. if(upper(left(vehicleType,5))='ADHOC','ADHOC_VAN', upper(vehicleType)) as vehicleType,
  861. createDateTime as runsheetCreateDateTime,
  862. startTime as runsheetStartDateTime,
  863. updateDateTime as runsheetUpdateDateTime,
  864. endTime as runsheetEndDateTime,
  865. DayName(createDateTime) as runsheetCreateDayName,
  866. hour(createDateTime) as runsheetCreateHour,
  867. hour(endTime) as runsheetEndHour,
  868. hour(startTime) as runsheetStartHour,
  869. hour(updateDateTime) as runsheetUpdateHour,
  870. startKm as runsheetStartKM,
  871. endKm as runsheetEndKM,
  872. // if (DayName(createDateTime)=DayName(Today(1)-1),1,0) as varForYesterday,
  873. posId,
  874. posSerial as posTerminalIDRS
  875.  
  876. // startKm,
  877. //endKm;
  878. FROM
  879. [$(qvdPath_fsd)fsd_runsheet.qvd]
  880. (qvd) where Timestamp(createDateTime) >= Timestamp(today()-$(RELOAD_VOLUME));
  881.  
  882.  
  883.  
  884.  
  885.  
  886. //SQL SELECT *
  887. //FROM fklogistics.runsheet where DATE(createDateTime)>date_sub(curdate(),interval 90 day);
  888.  
  889. //left join(Runsheet1)
  890. //Load date as runsheetCreateDayName,
  891. // day_date as runsheetCreate_day,
  892. // week_date as runsheetCreate_week,
  893. // month_date as runsheetCreate_month,
  894. // year_date as runsheetCreate_year
  895. // FROM [$(qvdPath_common)date_calendar.qvd]
  896. //(qvd);
  897.  
  898.  
  899. drsDeliveryAttempt:
  900. left keep(Runsheet1)
  901. //left keep(fkl_shipments)
  902. LOAD distinct
  903. runsheetId,
  904. upper(shipmentId) as tracking_id,
  905. deliveryAttemptDateTime,
  906. wasDelivered,
  907. deliveryType as run_deliveryType,
  908. mobileUpdateDateTime as drsMobileUpdateDateTime,
  909. hour(mobileUpdateDateTime) as drsMobileUpdateDateTimeHour,
  910. hour(deliveryAttemptDateTime) as deliveryAttemptHour,
  911. mobileUpdateUserid as drsMobileUpdateuserid,
  912. posTransactionId as authCodeRS,
  913. posTerminalId as posTerminalIdFE,
  914. dayname(deliveryAttemptDateTime)&posTransactionId&posTerminalId as keyPOS,
  915. transactionMode as posIntegrationFlag,
  916. receiverRelation,
  917. receivedLocation
  918. FROM
  919. [$(qvdPath_fsd)fsd_drsdeliveryattempt.qvd](qvd)
  920. where Timestamp(deliveryAttemptDateTime) >= Timestamp(today()-$(RELOAD_VOLUME));
  921.  
  922. left join(drsDeliveryAttempt)
  923. LOAD
  924. upper(shipmentId) as tracking_id,
  925. preferredDate,
  926. if (DayName(preferredDate)=DayName(Today(1)-1),1,0) as preferredDateYesterday
  927. FROM
  928. [$(qvdPath_fsd)fsd_shipmentChangeDeliveryDateMetaData.qvd](qvd) ;
  929.  
  930. left join(drsDeliveryAttempt)
  931. LOAD
  932. upper(shipmentId) as tracking_id,
  933. //createDateTime,
  934. //updateDateTime,
  935. updater
  936. FROM
  937. [$(qvdPath_fsd)fsd_shipmentCSActionFlagMapping.qvd]
  938. (qvd) where isActive=1 and updater='self_serve' and flagId=9;
  939.  
  940. left join(drsDeliveryAttempt)
  941. LOAD// reconciliationId,
  942. upper(shipmentId) as tracking_id,
  943. wasPendingInSystem as wasPendingInSystemDRS,
  944. wasPendingInHub as wasPendingInHubDRS,
  945. updateDateTime as updateDateTimePendingDRS,
  946. dayname(updateDateTime) as updateDatePendingDRS
  947. FROM
  948. [$(qvdPath_fsd)fsd_pendingReconciliation.qvd]
  949. (qvd);
  950.  
  951. left join(drsDeliveryAttempt)
  952. Load distinct tracking_id,
  953. cost_of_breach,
  954. ekl_shipment_type_ekl_db as fsd_shipment_type,
  955. shipmentChargeableWeightFinal,
  956. fsd_current_status_desc,
  957. fsd_current_status_code,
  958. shipment_value,
  959. delivery_type,
  960. fsd_current_status,
  961. sub_category,
  962. category,
  963. product_id ,
  964. super_category,
  965. vertical,
  966. anlt_cluster,
  967. order_priority_flag
  968. resident shipmentFact;
  969. //FROM
  970. //[$(qvdPath_fkl)fkl_shipment_fact.qvd]
  971. //(qvd)
  972. //where floor(created_at) >= floor(today()-$(RELOAD_VOLUME));
  973.  
  974.  
  975.  
  976. left keep(drsDeliveryAttempt)
  977. MIS:
  978. LOAD Distinct
  979. id as bankTransactionId,
  980. dateOfTransaction,
  981. merchantId as merchantIdPOS,
  982. terminalId as posTerminalIdBank,
  983. authCode as authCodeBank ,
  984. dayname(dateOfTransaction)&authCode&terminalId as keyPOS,
  985. //amount,
  986. status as statusPOSRecon ,
  987. dayname(updatedAt) as posreconDate,
  988. if (DayName(updatedAt)=DayName(Today(1)-1),1,0) as posreconDateYesterday,
  989. amountReconciled,
  990. //createdAt,
  991. //updatedAt,
  992. //uploadedBy,
  993. bank as bankPOS
  994. FROM
  995. [$(qvdPath_fsd)fsd_posBankTransaction.qvd](qvd);
  996.  
  997. left join(MIS)
  998. LOAD distinct
  999. //id,
  1000. bankTransactionId,
  1001. runsheetId as runsheetIdMIS,
  1002. shipmentId as tracking_idMIS,
  1003. shipmentAmount,
  1004. amount
  1005. FROM
  1006. [$(qvdPath_fsd)fsd_posReconciliation.qvd](qvd);
  1007.  
  1008. left join(drsDeliveryAttempt)
  1009. Load keyPOS,
  1010. statusPOSRecon as statusPOSReconERP
  1011. resident MIS;
  1012.  
  1013. left join (Runsheet1)
  1014. LOAD distinct
  1015. runsheetId,
  1016. min(time(deliveryAttemptDateTime)) as runsheetfirstDeliveredTime,
  1017. max(time(deliveryAttemptDateTime)) as runsheetlastDeliveredTime,
  1018. //max(time(deliveryAttemptDateTime))- runsheetStartDateTime as runsheetStartTolLastDeliveredTime,
  1019. //runsheetEndDateTime - runsheetStartDateTime as runsheetStartToEndDateTime,
  1020. //max(time(deliveryAttemptDateTime)) - min(time(deliveryAttemptDateTime)) as runsheetFirstToLastDeliveredTime,
  1021. if(count(if(drsMobileUpdateDateTime<>null() and upper(left(drsMobileUpdateuserid,6))='MOBILE',drsMobileUpdateDateTime))>0,'Device','Manual') as runsheetType,
  1022.  
  1023. if(sum(if(run_deliveryType='POS' or (run_deliveryType='COD' and upper(posIntegrationFlag)='PINELAB'),1))>0,'POS','NonPOS') as runsheetPOSType,
  1024. //count( distinct if (wasDelivered=1 and runsheetCreateDayName=DayName(deliveryAttemptDateTime),tracking_id)) as shipmentsDelivered,
  1025. //count( distinct if (runsheetCreateDayName=DayName(deliveryAttemptDateTime),tracking_id)) as shipmentsAttempted
  1026. count( distinct if (wasDelivered=1 ,tracking_id)) as shipmentsDelivered,
  1027. count( distinct if (wasDelivered=1 and upper(delivery_type)<>'SMALL',tracking_id)) as shipmentsDeliveredVol,
  1028. count( distinct (tracking_id)) as shipmentsAttempted
  1029. resident drsDeliveryAttempt
  1030. Group by runsheetId ;
  1031.  
  1032. left join(Runsheet1)
  1033. LOAD distinct runsheetId,
  1034. agentId as runAgentId
  1035. FROM
  1036. [$(qvdPath_fsd)fsd_runsheettoagent.qvd]
  1037. (qvd);
  1038.  
  1039. left join(Runsheet1)
  1040. LOAD distinct runAgentId,
  1041. FHRId
  1042. Resident Run_Agents;
  1043.  
  1044. left join(Runsheet1)
  1045. LOAD //id as deviceIdSD,
  1046. imeiSD as imeiSDRS,
  1047. // isActive as isActiveSD,
  1048. // isBlocked as isBlockedSD,
  1049. // hubId as fsd_HubId,
  1050. // imei2 as imei2SD,
  1051. // deviceTag as deviceTagSD ,
  1052. byodSD as byodSDRS,
  1053. agentIdSD as runAgentId,
  1054. devUpdateDayName
  1055. resident smartDeviceMap where isActiveSD=1 and isActiveSDMap=1;
  1056.  
  1057. left keep(Run_Agents_Date)
  1058. Runsheet:
  1059. //NoConcatenate
  1060. Load distinct
  1061. runsheetId,
  1062. imeiSDRS,
  1063. byodSDRS,
  1064. vehicleType,
  1065. runsheetCreateDateTime,
  1066. runsheetStartDateTime,
  1067. runsheetUpdateDateTime,
  1068. runsheetEndHour,
  1069. runsheetCreateHour,
  1070. runsheetStartHour,
  1071. runsheetUpdateHour,
  1072. runsheetEndDateTime,
  1073. runsheetCreateDayName,
  1074. //varForYesterday,
  1075. posId,
  1076. posTerminalIDRS,
  1077. runsheetfirstDeliveredTime,
  1078. runsheetlastDeliveredTime,
  1079. runsheetType,
  1080. runsheetPOSType,
  1081. shipmentsDelivered,
  1082. shipmentsDeliveredVol,
  1083. shipmentsAttempted ,
  1084. FHRId&runsheetCreateDayName as key,
  1085. FHRId&runsheetCreateDayName as keyRS,
  1086. runAgentId&runsheetCreateDayName as key10,
  1087. runsheetlastDeliveredTime - runsheetStartDateTime as runsheetStartTolLastDeliveredTime,
  1088. runsheetEndDateTime - runsheetStartDateTime as runsheetStartToEndDateTime,
  1089. runsheetlastDeliveredTime - runsheetfirstDeliveredTime as runsheetFirstToLastDeliveredTime,
  1090. devUpdateDayName as devUpdateDayNameRS,
  1091. runsheetStartKM,
  1092. runsheetEndKM
  1093. Resident Runsheet1 ;
  1094. //where devUpdateDayName<=runsheetCreateDayName or IsNull(devUpdateDayName)
  1095.  
  1096. left join(Runsheet)
  1097. LOAD distinct runsheetId,
  1098. expectedAmount,
  1099. posAmount,
  1100. lostAmount,
  1101. collectedAmount,
  1102. unreconciledAmount,
  1103. //remarks,
  1104. status as statuscashRecon,
  1105. updateTimeStamp as updateTimeStampCashRecon,
  1106. dayname(updateTimeStamp) as cashReconDayName
  1107. FROM
  1108. [$(qvdPath_fsd)fsd_runsheetCashierInfo.qvd]
  1109. (qvd);
  1110.  
  1111. DROP Table Runsheet1;
  1112.  
  1113.  
  1114.  
  1115. //exit script;
  1116.  
  1117. DevAuthCodeInfo:
  1118. Load *
  1119. FROM
  1120. [$(qvdPath_fsd)fsd_deviceAuthCodeInfo.qvd](qvd);
  1121. //where isActive=1;
  1122.  
  1123. DevAuthCodeInfo1:
  1124. NoConcatenate
  1125. Load distinct agentId as runAgentId,
  1126. isActive,
  1127. authCode,
  1128. dayname(expiryDate) as deviceExpDate,
  1129. dayname(createDateTime) as devCreateDate,
  1130. dayname(updateDateTime) as devUpdateDate,
  1131. agentId&dayname(createDateTime)as key10
  1132. resident DevAuthCodeInfo;
  1133.  
  1134. DevAuthCodeInfo2:
  1135. NoConcatenate
  1136. Load distinct key10,
  1137. if(count(authCode)>=1,1,0) as isDeviceActive
  1138. resident DevAuthCodeInfo1
  1139. group by key10 ;
  1140.  
  1141. left join(Runsheet)
  1142. Load distinct key10,
  1143. isDeviceActive
  1144. //deviceAuthCode
  1145. Resident DevAuthCodeInfo2;
  1146.  
  1147. left join(Runsheet)
  1148. Load distinct key10,
  1149. LastValue(authCode) as authCode
  1150. //deviceAuthCode
  1151. Resident DevAuthCodeInfo1 group by key10 order by authCode desc ;
  1152.  
  1153. //exit script;
  1154. left join(Runsheet)
  1155. LOAD distinct
  1156. runsheetId,
  1157. name,
  1158. replace(upper(value),' ','') as vehicleNo
  1159. //createDateTime,
  1160. //updateDateTime
  1161. FROM
  1162. [$(qvdPath_fsd)fsd_runsheet_Attribute.qvd](qvd);
  1163.  
  1164. drop table DevAuthCodeInfo;
  1165. drop table DevAuthCodeInfo1;
  1166. drop table DevAuthCodeInfo2;
  1167.  
  1168. //left keep (Runsheet)
  1169. //LOAD posId,
  1170. // merchantId as posVendorMid,
  1171. // provider as posVendorName
  1172. //FROM
  1173. //[$(qvdPath_fsd)fsd_posDevice.qvd]
  1174. //(qvd);
  1175. //exit script;
  1176. ///$tab Reverse Pickup
  1177.  
  1178. PickupsheetFact1:
  1179. LOAD distinct pickupSheetId,
  1180. dayname(updateDateTime) as pickupSheetUpDateDayName ,
  1181. isActive
  1182. // sentForPickup,
  1183. // startKm,
  1184. // endKm,
  1185. // startTime,
  1186. // endTime,
  1187. // updateDateTime as pickupSheetUpDateDateTime
  1188. // hour(updateDateTime) as pickupSheetUpDateHour
  1189. // requestId
  1190. FROM
  1191. [$(qvdPath_fkl)fkl_pickup_sheet.qvd](qvd)
  1192. where Timestamp(updateDateTime) >= Timestamp(today()-$(RELOAD_VOLUME));
  1193.  
  1194. left join(PickupsheetFact1)
  1195. LOAD distinct mappingId,
  1196. pickupSheetId,
  1197. agentId as runAgentPickupId
  1198. // agentId&pickupSheetUpDateDayName as key
  1199. // updateDateTime
  1200. FROM
  1201. [$(qvdPath_fkl)fkl_pickup_sheet_agent_mapping.qvd]
  1202. (qvd);
  1203.  
  1204. left join(PickupsheetFact1)
  1205. LOAD
  1206. pickupSheetId,
  1207. //name,
  1208. if(upper(left(type,5))='ADHOC','ADHOC_VAN', upper(type)) as rvp_vehicle_type,
  1209. replace(upper(value),' ','') as rvp_vehicle_no
  1210.  
  1211. FROM
  1212. [$(qvdPath_fkl)fkl_pickupSheetAttributes.qvd]
  1213. (qvd);
  1214.  
  1215. left join(PickupsheetFact1)
  1216. LOAD distinct runAgentId as runAgentPickupId,
  1217. FHRId as FHRIdPickup
  1218. Resident Run_Agents;
  1219.  
  1220. left keep (PickupsheetFact1)
  1221. PickupDetails:
  1222. LOAD distinct pickupAttemptId,
  1223. shipmentId as rev_shipmentid,
  1224. // requestId,
  1225. pickupSheetId,
  1226. customerId as pickupcustomerId,
  1227. attemptTime as pickupAttemptTime,
  1228. // attemptCode,
  1229. // actionTaken,
  1230. // idProof,
  1231. // note,
  1232. updateTimeStamp as pickupupdateTimeStamp
  1233. FROM
  1234. [$(qvdPath_fkl)fkl_pickup_attempt.qvd]
  1235. (qvd);
  1236.  
  1237.  
  1238. left join(PickupDetails)
  1239. LOAD distinct pickupId as rev_pickupid,
  1240. shipmentId as rev_shipmentid,
  1241. // orderId as order_id,
  1242. // reverseId as rev_order_id,
  1243. ApplyMap('fsd_status_mapping',statusId, null()) as rev_current_status ,
  1244. // if(statusId=44,'PickupComplete','PickupNotComplete') as rev_pickup_status,
  1245. if(statusId=44,1,0) as wasPicked,
  1246. // if(statusId<>29 and statusId<>22 and statusId<>66 and statusId<>49 and statusId<>68 and statusId<>44 and statusId<>61 and statusId<>3
  1247. // ,'Pickup_pending' ,'Pickup_not_pending') as rev_pending_flag,
  1248. ////'Cancelled','Lost','PICKUP_Cancelled','PICKUP_NotPicked_Attempted_CustomerRefused','PICKUP_Picked_Complete','Received','PICKUP_Picked_Partial'
  1249. // itemCount as rev_qnty,
  1250. // scheduleDateTime as rev_sheduled_datetime,
  1251. DayName(scheduleDateTime) as rev_sheduled_date,
  1252. // ApplyMap('day_map',Dayname(scheduleDateTime), null()) as rev_shedule_date_indays,
  1253. // destinationWarehouse as rev_destination_fc,
  1254. // pickupHubId as rev_pickup_hubid,
  1255. // ApplyMap('hubid_hubname_mapping',pickupHubId,null()) as rev_hub_name,
  1256. // ApplyMap('hub_zone_map',ApplyMap('hubid_hubname_mapping',pickupHubId,null()),null()) as rev_hub_zone,
  1257. // ApplyMap('hub_city_map',ApplyMap('hubid_hubname_mapping',pickupHubId,null()),null()) as rev_hub_city,
  1258. // ApplyMap('day_map',Dayname(Today()-1), null()) as today_indays,
  1259. // (ApplyMap('day_map',Dayname(Today()-1), null())-ApplyMap('day_map',Dayname(scheduleDateTime), null())) as rev_pending_indays,
  1260. reverseType as rev_type,
  1261. mobileUpdateUserid,
  1262. mobileUpdateDateTime,
  1263. updateDateTime as revPickupUpdateDateTime,
  1264. dayname(updateDateTime) as revPickupUpdateDateDayName
  1265. FROM
  1266. [$(qvdPath_fkl)fkl_pickup_event.qvd]
  1267. (qvd);
  1268. //where Timestamp(deliveryAttemptDateTime) >= Timestamp(today()-60);
  1269.  
  1270. left keep(Run_Agents_Date)
  1271. PickupsheetFact:
  1272. //NoConcatenate
  1273. Load *,
  1274. //if (pickupSheetUpDateDayName=shipmentPickupUpdateDayName and rev_pickup_status='PickupComplete',1,0) as wasPicked,
  1275. //if (rev_pickup_status='PickupComplete',1,0) as wasPicked,
  1276. FHRIdPickup&pickupSheetUpDateDayName as key,
  1277. FHRIdPickup&pickupSheetUpDateDayName as keyPS
  1278. resident PickupsheetFact1;
  1279.  
  1280. PickupDetails1:
  1281. NoConcatenate
  1282. Load *
  1283. resident PickupDetails;
  1284.  
  1285. left join(PickupDetails1)
  1286. Load distinct pickupSheetId,
  1287. pickupSheetUpDateDayName
  1288. Resident PickupsheetFact;
  1289.  
  1290.  
  1291. left join(PickupsheetFact)
  1292. Load distinct pickupSheetId,
  1293. //count(distinct(if(wasPicked=1 and DayName(revPickupUpdateDateTime)=pickupSheetUpDateDayName,rev_shipmentid))) as sumRVPPicked,
  1294. //count(distinct(if(DayName(revPickupUpdateDateTime)=pickupSheetUpDateDayName,rev_shipmentid))) as sumRVPPickedAttempt
  1295. count(distinct(if(wasPicked=1 and upper(rev_type)='PICKUP_ONLY' and revPickupUpdateDateDayName=pickupSheetUpDateDayName,rev_shipmentid))) as sumRVPPicked,
  1296. count(distinct(if(upper(rev_type)='PICKUP_ONLY' and revPickupUpdateDateDayName=pickupSheetUpDateDayName,rev_shipmentid))) as sumRVPPickedAttempt
  1297. resident PickupDetails1
  1298. group by pickupSheetId;
  1299.  
  1300. drop table PickupDetails1;
  1301.  
  1302. drop table PickupsheetFact1;
  1303.  
  1304.  
  1305. //exit script;
  1306. ///$tab MP
  1307. left keep(Run_Agents_Date)
  1308. MPSheetFact1:
  1309. LOAD distinct
  1310. pickup_sheet_id as mp_pickup_sheet_id,
  1311. pickup_request_id as mp_pickup_request_id,
  1312. //in_time,
  1313. // out_time,
  1314. //created_by,
  1315. //updated_by,
  1316. dayname(created_at) as mp_sheet_createday
  1317. //if (DayName(created_at)=DayName(Today(1)-1),1,0) as mp_varForYesterday
  1318. //updated_at
  1319. //weight,
  1320. //remarks,
  1321. //notes
  1322. FROM
  1323. [$(qvdPath_proc)proc_pr_pickup_attempts.qvd]
  1324. (qvd)
  1325. where Timestamp(updated_at) >= Timestamp(today()-$(RELOAD_VOLUME));
  1326.  
  1327. left keep(MPSheetFact1)
  1328. MPdetails:
  1329. LOAD distinct id as mp_pickup_request_id,
  1330. tracking_id as mp_tracking_id ,
  1331. // merchant_id,
  1332. //supplier_location_id,
  1333. procurement_facility_id as mp_procurement_facility_id,
  1334. // fkl_facility_id,
  1335. //route_id,
  1336. status as mp_status,
  1337. if(status='received_at_tc' or status='received_at_origin' or status='dispatched_to_tc' or status='pickup_complete',1,0) as wasMPPicked,
  1338. // if( status='received_at_origin' or status='pickup_complete',1,0) as wasMPPicked,
  1339. requested_date as mp_requested_date,
  1340. pickup_date as mp_pickup_date
  1341. //procurement_type,
  1342. //priority,
  1343. // remarks,
  1344. //merchant_reference_id,
  1345. //supplier_reference_id,
  1346. //created_by,
  1347. //updated_by,
  1348. // created_at,
  1349. //updated_at
  1350. //is_active_in_ps
  1351. FROM
  1352. [$(qvdPath_proc)proc_pickup_requests.qvd]
  1353. (qvd)
  1354. where Timestamp(updated_at) >= Timestamp(today()-$(RELOAD_VOLUME));
  1355.  
  1356. left join(MPdetails)
  1357. Load distinct mp_pickup_sheet_id,
  1358. mp_pickup_request_id
  1359. resident MPSheetFact1;
  1360.  
  1361.  
  1362.  
  1363. left join(MPSheetFact1)
  1364. LOAD distinct id as mp_pickup_sheet_id,
  1365. //status,
  1366. vehicle_id as mp_vehicle_id,
  1367. //field_executive_id as runAgentId,
  1368. field_executive_id,
  1369. //start_distance,
  1370. //end_distance,
  1371. //created_by,
  1372. //updated_by,
  1373. //created_at,
  1374. updated_at as mp_sheet_updateDateTime
  1375. //notes,
  1376. // procurement_facility_id
  1377. FROM
  1378. [$(qvdPath_proc)proc_pickup_sheets.qvd](qvd)
  1379. where status <>'cancelled';
  1380.  
  1381. left join(MPSheetFact1)
  1382. LOAD distinct runAgentId as field_executive_id,
  1383. FHRId as FHRIdMP
  1384. Resident Run_Agents;
  1385.  
  1386. left join(MPSheetFact1)
  1387. LOAD distinct id as mp_vehicle_id,
  1388. if(upper(left(type,5))='ADHOC','ADHOC_VAN', upper(type)) as mp_vehicle_type
  1389. FROM
  1390. [$(qvdPath_ekl_facility)ekl_facilities_vehicles.qvd]
  1391. (qvd);
  1392.  
  1393.  
  1394. //left join(MP)
  1395. //LOAD //id as mp_field_executive_id,
  1396. // id as runAgentId,
  1397. // //id&mp_sheet_createday as key,
  1398. // //employee_id as mp_employee_id,
  1399. // //first_name as mp_agent_name,
  1400. // display_name as mp_agent_name,
  1401. // Right(display_name,len(display_name)-Index(display_name,'_',-1)) as mp_FHRId
  1402. //FROM
  1403. //[$(qvdPath_ekl_facility)ekl_facilities_agents.qvd]
  1404. //(qvd);
  1405.  
  1406. MPSheetFact:
  1407. NoConcatenate
  1408. Load distinct mp_pickup_sheet_id,
  1409. // mp_pickup_request_id,
  1410. mp_sheet_createday,
  1411. field_executive_id,
  1412. mp_sheet_updateDateTime,
  1413. FHRIdMP,
  1414. mp_vehicle_id,
  1415. // mp_vehicle_type ,
  1416. FHRIdMP&mp_sheet_createday as key,
  1417. FHRIdMP&mp_sheet_createday as keyMP
  1418. Resident MPSheetFact1;
  1419.  
  1420. left join(MPSheetFact)
  1421. LOAD //id,
  1422. pickup_sheet_id as mp_pickup_sheet_id ,
  1423. //value as mp_vehicle_type
  1424. if(upper(left(value,5))='ADHOC','ADHOC_VAN', upper(value)) as mp_vehicle_type
  1425. FROM
  1426. [$(qvdPath_proc)proc_pickupSheetAttributes.qvd](qvd)
  1427. where name ='vehicle_type';
  1428.  
  1429. left join(MPSheetFact)
  1430. LOAD //id,
  1431. pickup_sheet_id as mp_pickup_sheet_id ,
  1432. replace(upper(value),' ','') as mp_vehicle_no
  1433. FROM
  1434. [$(qvdPath_proc)proc_pickupSheetAttributes.qvd](qvd)
  1435. where name ='vehicle_number';
  1436.  
  1437.  
  1438. //left join(MPSheetFact2)
  1439. //Load
  1440. // mp_pickup_request_id,
  1441. // mp_tracking_id,
  1442. // wasMPPicked
  1443. //resident MPdetails;
  1444. //group by mp_pickup_request_id;
  1445.  
  1446. left join(MPSheetFact)
  1447. //NoConcatenate
  1448. Load Distinct
  1449. mp_pickup_sheet_id,
  1450. // mp_pickup_request_id,
  1451. count(DISTINCT(if(wasMPPicked=1 ,mp_tracking_id))) as sumMPPicked,
  1452. count(DISTINCT(mp_tracking_id)) as sumMPPickedAttempt
  1453. resident MPdetails
  1454. group by mp_pickup_sheet_id;
  1455.  
  1456.  
  1457. drop table MPSheetFact1;
  1458. //drop table MPSheetFact2;
  1459.  
  1460. //exit script;
  1461.  
  1462. MPDetails1:
  1463. NoConcatenate
  1464. Load Distinct
  1465. mp_tracking_id ,
  1466. mp_procurement_facility_id,
  1467. mp_status,
  1468. wasMPPicked,
  1469. mp_requested_date,
  1470. mp_pickup_date,
  1471. mp_pickup_sheet_id
  1472. resident MPdetails;
  1473.  
  1474. drop table MPdetails;
  1475. //left keep(MPSheetFact)
  1476. //MP_Hub:
  1477. //LOAD distinct id as mp_procurement_facility_id,
  1478. // display_name as mp_procurement_hub
  1479. //FROM
  1480. //[$(qvdPath_ekl_facility)ekl_facilities_facilities.qvd]
  1481. //(qvd)
  1482. //where type='PICKUP_HUB';
  1483. //
  1484. //left join(MP_Hub)
  1485. //LOAD
  1486. // Destination as mp_procurement_hub,
  1487. // [Destination City] as mp_procurement_City,
  1488. // [Ops Zone] as mp_procurement_Zone
  1489. //FROM
  1490. //[$(qvdPath_excel)Final Map v3.xlsx]
  1491. //(ooxml, embedded labels, table is Route);
  1492. //
  1493. //left join(MP_Hub)
  1494. //LOAD //[Hub Id] as fsd_HubId,
  1495. // //[Hub Name],
  1496. // [MP Vans] as Vans_MP_Fixed,
  1497. // Proc_Facility_Id as mp_procurement_facility_id
  1498. //FROM
  1499. //[$(qvdPath_excel)MP_Vans_Hub.xlsx]
  1500. //(ooxml, embedded labels, table is Sheet1);
  1501.  
  1502. store MPSheetFact into [$(qvdPath_fsd)fsd_MPSheet_Fact.qvd](qvd);
  1503.  
  1504. //exit script;
  1505.  
  1506. Run_Agents1:
  1507. NoConcatenate
  1508. Load Distinct
  1509. FHRId,
  1510. //runAgentName,
  1511. isFEActive,
  1512. isFAMAcitve,
  1513. runAgentNameFinal,
  1514. FEJoiningDate,
  1515. fsd_loc_code as fsd_loc_code_ra,
  1516. fsd_HubId
  1517. resident Run_Agents;
  1518.  
  1519. drop table Run_Agents;
  1520.  
  1521.  
  1522.  
  1523. //left join(Run_Agents_Date)
  1524. ////NoConcatenate
  1525. //Load distinct keyRS as key,
  1526. // sum(shipmentsDelivered) as shipmentsDeliveredAgents ,
  1527. // sum(shipmentsAttempted) as shipmentsAttemptedAgents
  1528. //resident Runsheet
  1529. //group by keyRS ;
  1530. //
  1531. //left join(Run_Agents_Date)
  1532. //Load distinct keyPS as key,
  1533. // sum(sumRVPPicked) as RVPPickedAgents,
  1534. // sum(sumRVPPickedAttempt) as RVPPickedAttemptAgents
  1535. //resident PickupsheetFact
  1536. //group by keyPS ;
  1537. //
  1538. //left join(Run_Agents_Date)
  1539. //Load distinct keyMP as key,
  1540. // sum(sumMPPicked) as MPPickedAgents,
  1541. // sum(sumMPPickedAttempt) as MPPickedAttemptAgents
  1542. //resident MPSheetFact
  1543. //group by keyMP ;
  1544.  
  1545.  
  1546. ///$tab Van
  1547. Van_Hub:
  1548. left keep(Run_Hub_Final)
  1549. LOAD
  1550. facility_id as fsd_HubId,
  1551. vehicle_id
  1552. // active,
  1553. // updated_at,
  1554. // created_at
  1555. FROM
  1556. [$(qvdPath_ekl_facility)ekl_facilities_facility_vehicles.qvd](qvd)
  1557. where active=1;
  1558.  
  1559. left join(Van_Hub)
  1560. LOAD id as vehicle_id,
  1561. number as vehicleNoHub,
  1562. type as vehicleTypeHub
  1563. // active as vehicleActiveHub
  1564. // updated_at ,
  1565. // created_at,
  1566. // display_name
  1567. FROM
  1568. [$(qvdPath_ekl_facility)ekl_facilities_vehicles.qvd](qvd)
  1569. where active =1 and type='van' ;
  1570.  
  1571.  
  1572.  
  1573. Van_Agent_Date1:
  1574. Load key,
  1575. vehicleNo as vehicleNoCalc,
  1576. if(upper(vehicleType)='VAN','VAN','ADHOC_VAN') as vehicleTypeCalc,
  1577. 'DELIVERY' as vehicleModeCalc,
  1578. vehicleNo&runsheetCreateDayName as keyVehicle
  1579. resident Runsheet
  1580. where upper(vehicleType)='VAN' or upper(vehicleType)='ADHOC_VAN';
  1581.  
  1582. Concatenate(Van_Agent_Date1)
  1583. Load key,
  1584. mp_vehicle_no as vehicleNoCalc,
  1585. if(upper(mp_vehicle_type)='VAN','VAN','ADHOC_VAN') as vehicleTypeCalc,
  1586. 'MP' as vehicleModeCalc,
  1587. mp_vehicle_no&mp_sheet_createday as keyVehicle
  1588. resident MPSheetFact
  1589. where upper(mp_vehicle_type)='VAN' or upper(mp_vehicle_type)='ADHOC VAN';
  1590.  
  1591. Concatenate(Van_Agent_Date1)
  1592. Load key,
  1593. rvp_vehicle_no as vehicleNoCalc,
  1594. if(upper(rvp_vehicle_type)='VAN','VAN','ADHOC_VAN') as vehicleTypeCalc,
  1595. 'RVP' as vehicleModeCalc,
  1596. rvp_vehicle_no&pickupSheetUpDateDayName as keyVehicle
  1597. resident PickupsheetFact
  1598. where upper(rvp_vehicle_type)='VAN' or upper(rvp_vehicle_type)='ADHOC_VAN';
  1599.  
  1600. Van_Agent_Date:
  1601. left keep(Run_Agents_Date)
  1602. Load distinct *
  1603. Resident Van_Agent_Date1
  1604. where not isnull(vehicleNoCalc);
  1605.  
  1606. Run_Agents_Date3:
  1607. NoConcatenate
  1608. Load *
  1609. Resident Run_Agents_Date;
  1610.  
  1611. //exit script;
  1612.  
  1613. left join(Run_Agents_Date3)
  1614. Load distinct key,
  1615. //vehicleType,
  1616. sum(shipmentsDelivered) as shipmentsDeliveredTotalBike,
  1617. sum(shipmentsAttempted) as shipmentsAttemptedTotalBike
  1618. Resident Runsheet
  1619. where upper(vehicleType)='BIKE'
  1620. group by key;
  1621.  
  1622. left join(Run_Agents_Date3)
  1623. Load distinct key,
  1624. //vehicleType,
  1625. sum(shipmentsDelivered) as shipmentsDeliveredTotalVan,
  1626. sum(shipmentsAttempted) as shipmentsAttemptedTotalVan
  1627. Resident Runsheet
  1628. where upper(right(vehicleType,3))='VAN'
  1629. group by key;
  1630.  
  1631. left join(Run_Agents_Date3)
  1632. Load distinct key,
  1633. sum(sumMPPicked)/2 as MPPickedTotalBike,
  1634. sum(sumMPPickedAttempt)/4 as MPAttemptedTotalBike
  1635. //mp_vehicle_type
  1636. Resident MPSheetFact
  1637. where upper(mp_vehicle_type)='BIKE'
  1638. group by key;
  1639.  
  1640. left join(Run_Agents_Date3)
  1641. Load distinct key,
  1642. sum(sumMPPicked)/4 as MPPickedTotalVan,
  1643. sum(sumMPPickedAttempt)/4 as MPAttemptedTotalVan
  1644. //mp_vehicle_type
  1645. Resident MPSheetFact
  1646. where upper(right(mp_vehicle_type,3))='VAN'
  1647. group by key;
  1648.  
  1649.  
  1650. left join(Run_Agents_Date3)
  1651. Load distinct key,
  1652. sum(sumRVPPicked) as RVPPickedTotalBike,
  1653. sum(sumRVPPickedAttempt) as RVPAttemptedTotalBike
  1654. // rvp_vehicle_type
  1655. Resident PickupsheetFact
  1656. where upper(rvp_vehicle_type)='BIKE'
  1657. group by key;
  1658.  
  1659. left join(Run_Agents_Date3)
  1660. Load distinct key,
  1661. sum(sumRVPPicked) as RVPPickedTotalVan,
  1662. sum(sumRVPPickedAttempt) as RVPAttemptedTotalVan
  1663. // rvp_vehicle_type
  1664. Resident PickupsheetFact
  1665. where upper(right(rvp_vehicle_type,3))='VAN'
  1666. group by key;
  1667.  
  1668. Run_Agents_Date4:
  1669. Load distinct key,
  1670. if(shipmentsDeliveredTotalBike>0,shipmentsDeliveredTotalBike,0) as shipmentsDeliveredTotalBike,
  1671. if(shipmentsDeliveredTotalVan>0,shipmentsDeliveredTotalVan,0) as shipmentsDeliveredTotalVan,
  1672. if(MPPickedTotalBike>0,MPPickedTotalBike,0) as MPPickedTotalBike,
  1673. if(MPPickedTotalVan>0,MPPickedTotalVan,0) as MPPickedTotalVan,
  1674. if(RVPPickedTotalBike>0,RVPPickedTotalBike,0) as RVPPickedTotalBike,
  1675. if(RVPPickedTotalVan>0,RVPPickedTotalVan,0) as RVPPickedTotalVan,
  1676.  
  1677. if(shipmentsAttemptedTotalBike>0,shipmentsAttemptedTotalBike,0) as shipmentsAttemptedTotalBike,
  1678. if(shipmentsAttemptedTotalVan>0,shipmentsAttemptedTotalVan,0) as shipmentsAttemptedTotalVan,
  1679. if(MPAttemptedTotalBike>0,MPAttemptedTotalBike,0) as MPAttemptedTotalBike,
  1680. if(MPAttemptedTotalVan>0,MPAttemptedTotalVan,0) as MPAttemptedTotalVan,
  1681. if(RVPAttemptedTotalBike>0,RVPAttemptedTotalBike,0) as RVPAttemptedTotalBike,
  1682. if(RVPAttemptedTotalVan>0,RVPAttemptedTotalVan,0) as RVPAttemptedTotalVan
  1683. Resident Run_Agents_Date3;
  1684.  
  1685. left join(Run_Agents_Date)
  1686. Load distinct key,
  1687. shipmentsDeliveredTotalBike,
  1688. shipmentsDeliveredTotalVan,
  1689. MPPickedTotalBike,
  1690. MPPickedTotalVan,
  1691. RVPPickedTotalBike,
  1692. RVPPickedTotalVan,
  1693. ((shipmentsDeliveredTotalBike + RVPPickedTotalBike + MPPickedTotalBike)
  1694. /(shipmentsDeliveredTotalBike + RVPPickedTotalBike + MPPickedTotalBike + RVPPickedTotalVan + MPPickedTotalVan + shipmentsDeliveredTotalVan)) as bikeDay,
  1695. (RVPPickedTotalVan + MPPickedTotalVan + shipmentsDeliveredTotalVan)
  1696. /(shipmentsDeliveredTotalBike + RVPPickedTotalBike + MPPickedTotalBike + RVPPickedTotalVan + MPPickedTotalVan + shipmentsDeliveredTotalVan) as vanDay,
  1697.  
  1698. shipmentsDeliveredTotalBike + RVPPickedTotalBike + MPPickedTotalBike + shipmentsDeliveredTotalVan + RVPPickedTotalVan + MPPickedTotalVan as dailyOverAllProd,
  1699.  
  1700. shipmentsDeliveredTotalBike + RVPPickedTotalBike + shipmentsDeliveredTotalVan + RVPPickedTotalVan as dailyOverAllDelProd,
  1701.  
  1702. shipmentsAttemptedTotalBike + shipmentsAttemptedTotalVan + RVPAttemptedTotalBike + RVPAttemptedTotalVan as dailyOverAllAttemptedDelProd
  1703.  
  1704. resident Run_Agents_Date4;
  1705.  
  1706. //left join(Run_Agents1)
  1707. //Load distinct left(key,len(key)-10) as FHRId,
  1708. // if (sum(dailyOverAllProd)>0,1,0) as isFEWorkingActive
  1709. //resident Run_Agents_Date
  1710. //where Dayname(right(key,10))>=Today()-5
  1711. //group by left(key,len(key)-10);
  1712.  
  1713.  
  1714. left join(Run_Agents1)
  1715. Load distinct FHRId,
  1716. if (sum(dailyOverAllProd)>0,1,0) as isFEWorkingActive
  1717. resident Run_Agents_Date
  1718. where Date>=Today()-5
  1719. group by FHRId;
  1720.  
  1721.  
  1722.  
  1723. drop table Run_Agents_Date3;
  1724.  
  1725. drop table Run_Agents_Date4;
  1726.  
  1727. drop table Van_Agent_Date1;
  1728.  
  1729. //exit script;
  1730. ///$tab FKL
  1731. //exit script;
  1732. shipmentReceiveDetails:
  1733. left keep(Run_Hub_Final)
  1734. //left keep(DayDetails)
  1735. LOAD distinct tracking_id as tracking_idRec,
  1736. fsd_last_dh_id as fsd_HubId,
  1737. fsd_last_dh_receive_date as DHReceiveDate,
  1738. fsd_last_dh_receive_datetime as DHReceiveDateTime ,
  1739. hour(fsd_last_dh_receive_datetime) as DHReceiveHour,
  1740. if (DayName(fsd_last_dh_receive_datetime)=DayName(Today(1)-1),1,0) as DateRecYesterday,
  1741. fsd_last_dh_receive_adjusted_date as DHReceiveAdjDate,
  1742. ekl_delivery_indays_adjusted,
  1743. Dh_delivery_indays,
  1744. fsd_last_dh_receive_adjusted_date,
  1745. ekl_delivery_date,
  1746. if(today()=WeekStart(today()) or today()=WeekStart(today())+1,
  1747. if(fsd_last_dh_receive_adjusted_date>=WeekStart(today(),0,-2)-5 and fsd_last_dh_receive_adjusted_date<=WeekStart(today(),0,-2)+1,'Todays Dash','Countout'),
  1748. if(fsd_last_dh_receive_adjusted_date>=WeekStart(today()) and fsd_last_dh_receive_adjusted_date<=today(),'Todays Dash','Countout')) as DH_Dash_Date_Range,
  1749. carrier,
  1750. If((fsd_current_status='Lost' or fsd_current_status='Untraceable'),'Lost_Damaged',
  1751. if(fsd_shipment_flag='RTO' and (fsd_last_hub_type<>'DELIVERY_HUB'),'Incoming_RTO',
  1752. ekl_shipment_type_ekl_db)) as ekl_shipment_type,
  1753. cost_of_breach as cost_of_breach_receive,
  1754. holiday_dh_date as holiday_dh_date_receive,
  1755. holiday_dh_flag as holiday_dh_flag_receive,
  1756. fsd_consignment_receive_datetime,
  1757. fsd_shipment_last_bag_receive_datetime,
  1758. // recToOFDTIme ,
  1759. fsd_consignment_receive_datetime-fsd_shipment_last_bag_receive_datetime as consignmentRecToBagReceiveTime,
  1760. fsd_last_OFD_datetime-fsd_last_dh_receive_datetime as recToOFDTime,
  1761. fsd_last_dh_receive_datetime-fsd_shipment_last_bag_receive_datetime as bagRecToDHReceiveTime
  1762. // shipment_idealBagCloseTime_60
  1763. Resident shipmentFact;
  1764.  
  1765. //FROM
  1766. //[C:\QlikviewFiles\Data\QV-erp\Data\fsd\fsd_shipment_fact.qvd](qvd)
  1767. //where Timestamp(fsd_first_DH_received_datetime) >= Timestamp(today()-$(RELOAD_VOLUME));
  1768.  
  1769.  
  1770. drop table shipmentFact;
  1771.  
  1772. ///$tab Cost
  1773. //trial1:
  1774. //Load distinct vendor_tracking_id as tracking_id,
  1775. // merchant_reference_id as merchant_reference_idShip,
  1776. // weight,
  1777. // payment_type,
  1778. // merchant_code,
  1779. // shipment_type as shipment_typeShip,
  1780. // dayname(fkl_delivery_datetime) as fkl_delivery_dayname,
  1781. // dayname(RTO|RVP_received_datetime) as RTORVP_receive_dayname,
  1782. // carrier as carrierShip
  1783. // //trim(upper(text(MonthName(fkl_delivery_datetime)))) as fkl_delivery_month
  1784. //FROM
  1785. //[$(qvdPath_fkl)fkl_shipment_fact.qvd]
  1786. //(qvd)
  1787. //where Timestamp(created_at) >= Timestamp(today()-90)
  1788. //and carrier='FSD';
  1789. //
  1790. //left join(trial1)
  1791. //Load
  1792. //distinct unit_tracking_id as tracking_id,
  1793. ////Item_amount,
  1794. //order_item_id,
  1795. //product_id,
  1796. //unit_quantity,
  1797. //final_adjusted_amount as order_item_value,
  1798. //unit_status
  1799. ////unit_tracking_id&order_item_id as keyShip
  1800. ////sku
  1801. //FROM
  1802. //[$(qvdPath_common)Fact_table.qvd]
  1803. //(qvd)
  1804. //where Timestamp(dispatch_date) >= Timestamp(today()-90);
  1805. //
  1806. //trial2:
  1807. //NoConcatenate
  1808. //Load tracking_id, runsheetId
  1809. //resident drsDeliveryAttempt;
  1810. //
  1811. //left join(trial2)
  1812. //Load runsheetId,
  1813. // vehicleType as vehicleTypeShip,
  1814. // vehicleNo as vehicleNoShip
  1815. // //MonthName(runsheetCreateDateTime) as monthRunsheetCreate
  1816. //Resident Runsheet;
  1817. //
  1818. ////left keep(fkl_shipments)
  1819. //shipment_details1:
  1820. //Load distinct tracking_id,
  1821. // merchant_reference_idShip,
  1822. // order_item_id,
  1823. // product_id,
  1824. // weight as shipmentWeight,
  1825. // unit_status,
  1826. // unit_quantity,
  1827. // fkl_delivery_dayname,
  1828. // RTORVP_receive_dayname,
  1829. // if((shipment_typeShip='RTO' or shipment_typeShip='RVP'),RTORVP_receive_dayname,fkl_delivery_dayname) as fkl_action_dayname,
  1830. // // fkl_delivery_month,
  1831. // payment_type as shipmentPaymentType,
  1832. // order_item_value,
  1833. // merchant_code as merchant_codeShip,
  1834. // shipment_typeShip,
  1835. // carrierShip
  1836. // // keyShip
  1837. //resident trial1;
  1838. ////group by tracking_id, order_item_id,product_id;
  1839. //
  1840. //left join(shipment_details1)
  1841. //Load date as fkl_action_dayname,
  1842. // trim(upper(month_date)) as fkl_action_month
  1843. // FROM [$(qvdPath_common)date_calendar.qvd]
  1844. //(qvd);
  1845. //
  1846. //left join(shipment_details1)
  1847. //Load tracking_id as tracking_id,vehicleTypeShip,vehicleNoShip
  1848. //resident trial2;
  1849. //
  1850. //drop table trial1;
  1851. //drop table trial2;
  1852. //
  1853. //
  1854. ////LOAD
  1855. //// distinct order_item_id&tracking_id as keyShip,
  1856. //// quantity_rvp_done,
  1857. //// MonthName(updated_at) as monthRVP
  1858. ////FROM
  1859. ////[\QlikviewFiles\Data\QV-erp\Data\flo_oms_b2c\flo_oms_b2c_return_items.qvd]
  1860. ////(qvd);
  1861. //left join(shipment_details1)
  1862. //Load
  1863. //distinct tracking_id,
  1864. // order_item_id as order_item_id_rvp,
  1865. // quantity_rvp_done
  1866. //// MonthName(updated_at) as monthRVP
  1867. //FROM
  1868. //[$(qvdPath_flo_oms_b2c)flo_oms_b2c_return_items.qvd]
  1869. //(qvd);
  1870. //
  1871. //left join(shipment_details1)
  1872. //Load
  1873. //distinct order_item_id as order_item_id_rvp,
  1874. // product_id as product_id_rvp
  1875. //// MonthName(updated_at) as monthRVP
  1876. //from
  1877. //[$(qvdPath_common)Fact_table.qvd](qvd)
  1878. //where Timestamp(dispatch_date) >= Timestamp(today()-90);
  1879. //
  1880. //shipment_details:
  1881. //NoConcatenate
  1882. //Load * ,
  1883. // if(order_item_id<>null(),order_item_id,order_item_id_rvp) as order_item_id_final,
  1884. // if(product_id<>null(),product_id,product_id_rvp) as product_id_final,
  1885. // if(order_item_id<>null(),tracking_id&order_item_id,tracking_id&order_item_id_rvp) as keyShip
  1886. //resident shipment_details1;
  1887. //
  1888. //drop table shipment_details1;
  1889. //
  1890. //left join(shipment_details)
  1891. //LOAD
  1892. // distinct keyShip,
  1893. // if(shipment_typeShip='RVP',quantity_rvp_done,unit_quantity) as unit_quantity_shipments
  1894. //resident shipment_details;
  1895. //
  1896. //left join(shipment_details)
  1897. ////NoConcatenate
  1898. //Load distinct tracking_id,
  1899. // sum(unit_quantity_shipments) as shipments_quantity_total
  1900. //resident shipment_details
  1901. //group by tracking_id;
  1902. //
  1903. //left join(shipment_details)
  1904. //Load
  1905. //distinct product_id as product_id_final ,
  1906. //title_product_info,
  1907. //sub_category,
  1908. //category
  1909. //FROM
  1910. //[$(qvdPath_common)Product_InfoMP.qvd]
  1911. //(qvd);
  1912. //
  1913. ////left join(shipment_details)
  1914. ////Load distinct tracking_id,
  1915. //// merchant_reference_id as merchant_reference_id_sd
  1916. ////resident fkl_shipments;
  1917. //
  1918. //left join(shipment_details)
  1919. //LOAD Distinct id as merchant_reference_idShip,
  1920. // used_packing_box_id as warehouse_packing_box_id
  1921. //FROM
  1922. //[$(qvdPath_flo_warehouse_b2c)flo_warehouse_b2c_shipments.qvd]
  1923. //(qvd);
  1924. //
  1925. //left join(shipment_details)
  1926. //LOAD Distinct id as warehouse_packing_box_id,
  1927. // name as warehouse_pb_name
  1928. //FROM
  1929. //[$(qvdPath_flo_warehouse_b2c)flo_warehouse_b2c_packing_boxes.qvd]
  1930. //(qvd);
  1931. //
  1932. //
  1933. //left join(shipment_details)
  1934. //LOAD Distinct id as warehouse_packing_box_id,
  1935. // length as warehouse_pb_length,
  1936. // breadth as warehouse_pb_breadth,
  1937. // height as warehouse_pb_height,
  1938. // (length*breadth*height)/366 as shipment_volumetricWeight
  1939. //FROM
  1940. //[$(qvdPath_flo_warehouse_b2c)flo_warehouse_b2c_packing_boxes.qvd]
  1941. //(qvd);
  1942. //
  1943. //
  1944. //left join(shipment_details)
  1945. //LOAD Distinct FSN_shipping_info_fsn as product_id_final,
  1946. // FSN_shipping_info_fsnAvgWeight,
  1947. // FSN_shipping_info_fsnAvgPackedVolume,
  1948. // FSN_shipping_info_fsnAvgPackedVolume/366 as FSN_volWeight
  1949. //FROM
  1950. //[$(qvdPath_fsd)fsd_temp_FSN_shipping_info_Nir.qvd]
  1951. //(qvd);
  1952. //
  1953. //left join(shipment_details)
  1954. //Load Distinct product_id_final,
  1955. // if(FSN_volWeight>FSN_shipping_info_fsnAvgWeight,FSN_volWeight,FSN_shipping_info_fsnAvgWeight) as FSNchargeableWeight
  1956. //Resident shipment_details;
  1957. //
  1958. //left join(shipment_details)
  1959. //Load Distinct keyShip,
  1960. // FSNchargeableWeight*unit_quantity_shipments as FSNchargeableWeightOrder
  1961. //Resident shipment_details;
  1962. //
  1963. ////left join(shipment_details)
  1964. ////Load Distinct product_id,
  1965. //// if(isnull(chargeableWeight),0.5,chargeableWeight) as FSNchargeableWeightFinal
  1966. ////Resident shipment_details;
  1967. //
  1968. //left join(shipment_details)
  1969. //Load Distinct tracking_id,
  1970. // if(shipmentWeight>shipment_volumetricWeight,shipmentWeight,shipment_volumetricWeight) as shipmentChargeableWeightRaw
  1971. //Resident shipment_details;
  1972. //
  1973. //left join(shipment_details)
  1974. //Load Distinct tracking_id,
  1975. // if(shipmentChargeableWeightRaw>20,0.5,shipmentChargeableWeightRaw) as shipmentChargeableWeight
  1976. //Resident shipment_details;
  1977. //
  1978. //left join(shipment_details)
  1979. //Load Distinct tracking_id,
  1980. // if(isnull(shipmentChargeableWeight),0.5,shipmentChargeableWeight) as shipmentChargeableWeightFinal
  1981. //Resident shipment_details;
  1982. //
  1983. //left join(shipment_details)
  1984. //Load distinct keyShip,
  1985. // unit_quantity_shipments/shipments_quantity_total as shipment_ratio
  1986. //resident shipment_details;
  1987. //
  1988. //left join(shipment_details)
  1989. ////NoConcatenate
  1990. //Load distinct tracking_id,
  1991. // sum(FSNchargeableWeightOrder) as FSNchargeableWeightTotal
  1992. //resident shipment_details
  1993. //group by tracking_id;
  1994. //
  1995. //left join(shipment_details)
  1996. //Load distinct keyShip,
  1997. // (FSNchargeableWeightOrder/FSNchargeableWeightTotal)*shipmentChargeableWeightFinal as volumetric_ratio
  1998. //resident shipment_details;
  1999. //
  2000. //left join(shipment_details)
  2001. //Load distinct mp_tracking_id as tracking_id,
  2002. // wasMPPicked as wasMPPickedShipmentDetails,
  2003. // mp_vehicle_type as mp_vehicle_typeShipmentDetails,
  2004. // mp_sheet_createday as mp_sheet_createdayShipmentDetails
  2005. //Resident MP;
  2006. //
  2007. //left join(shipment_details)
  2008. //Load fkl_action_dayname,
  2009. // sum(if(vehicleTypeShip='bike' or shipment_typeShip='RVP' ,volumetric_ratio)) as volumetric_ratio_bike_total
  2010. //resident shipment_details
  2011. //group by fkl_action_dayname;
  2012. ////
  2013. //left join(shipment_details)
  2014. //Load fkl_action_dayname,
  2015. // sum(if(vehicleTypeShip='van' or vehicleTypeShip='other',shipment_ratio)) as shipment_ratio_van_total
  2016. //resident shipment_details
  2017. //group by fkl_action_dayname;
  2018. ////
  2019. //left join(shipment_details)
  2020. //Load fkl_action_dayname,
  2021. // sum(shipment_ratio) as shipment_ratio_total
  2022. //resident shipment_details
  2023. //group by fkl_action_dayname;
  2024. ////
  2025. //left join(shipment_details)
  2026. //Load fkl_action_dayname,
  2027. // sum(if(shipmentPaymentType='COD',shipment_ratio)) as shipment_ratio_total_COD
  2028. //resident shipment_details
  2029. //group by fkl_action_dayname;
  2030. ////
  2031. //left join(shipment_details)
  2032. //Load fkl_action_dayname,
  2033. // sum(if(shipmentPaymentType='COD',order_item_value)) as order_item_value_total
  2034. //resident shipment_details
  2035. //group by fkl_action_dayname;
  2036. ////
  2037. //left join(shipment_details)
  2038. //Load fkl_action_dayname,
  2039. // sum(if(wasMPPickedShipmentDetails=1,shipment_ratio)) as shipment_ratio_total_MP
  2040. //resident shipment_details
  2041. //group by fkl_action_dayname;
  2042. //
  2043. //left join(shipment_details)
  2044. //Load fkl_action_dayname,
  2045. // sum(if(wasMPPickedShipmentDetails=1 and mp_vehicle_typeShipmentDetails='Bike',shipment_ratio)) as shipment_ratio_total_MP_Bike
  2046. //resident shipment_details
  2047. //group by fkl_action_dayname;
  2048. //
  2049. //left join(shipment_details)
  2050. //Load fkl_action_dayname,
  2051. // sum(if(wasMPPickedShipmentDetails=1 and mp_vehicle_typeShipmentDetails='Van',shipment_ratio)) as shipment_ratio_total_MP_Van
  2052. //resident shipment_details
  2053. //group by fkl_action_dayname;
  2054. //
  2055. //left join(shipment_details)
  2056. //LOAD trim(upper(Month)) as fkl_action_month ,
  2057. // [FE Salary Marketplace] as FE_Salary_Marketplace,
  2058. // [Van Conveyance Marketplace] as Van_Conveyance_Marketplace ,
  2059. // [FE Salary Van] as FE_Salary_Van,
  2060. // [FE Salary Bike] as FE_Salary_Bike,
  2061. // [Van Conveyance] as Van_Conveyance,
  2062. // [Biker Conveyance] as Biker_Conveyance,
  2063. // [Central Team] as Central_Team,
  2064. // [Hubs rental and Misc] as HRM,
  2065. // [MH + TC Rent and Security] as MHTCRent_Security,
  2066. // [LMD - HI + TL + Security] as LMDHITL_Security,
  2067. // Incentives,
  2068. // Consumables,
  2069. // Communication,
  2070. // [MH + TC Manpower] as MHTC_Manpower ,
  2071. // [Collection Fixed] as Collection_Fixed,
  2072. // [Collection Variable] as Collection_Variable
  2073. //FROM
  2074. //[$(qvdPath_excel)Cost_Daily.xlsx]
  2075. //(ooxml, embedded labels, table is Sheet2);
  2076. ////
  2077. //left join(shipment_details)
  2078. //Load distinct keyShip,
  2079. // if(wasMPPickedShipmentDetails=1 and mp_vehicle_typeShipmentDetails='Bike',(shipment_ratio/shipment_ratio_total_MP)*FE_Salary_Marketplace,0) as Contri_FE_Salary_Marketplace,
  2080. // if(wasMPPickedShipmentDetails=1 and mp_vehicle_typeShipmentDetails='Van',(shipment_ratio/shipment_ratio_total_MP)*Van_Conveyance_Marketplace,0) as Contri_Van_Conveyance_Marketplace,
  2081. // if((vehicleTypeShip='van' or vehicleTypeShip='other'), (shipment_ratio/shipment_ratio_van_total)*FE_Salary_Van,0) as Contri_FE_Salary_Van,
  2082. //
  2083. // if(vehicleTypeShip='bike' or shipment_typeShip='RVP',(volumetric_ratio/volumetric_ratio_bike_total)*FE_Salary_Bike,0) as Contri_FE_Salary_Bike,
  2084. //
  2085. // if((vehicleTypeShip='van' or vehicleTypeShip='other'),shipment_ratio/shipment_ratio_total)*Van_Conveyance as Contri_Van_Conveyance,
  2086. //
  2087. // if(vehicleTypeShip='bike' or shipment_typeShip='RVP', (shipment_ratio/shipment_ratio_total))*Biker_Conveyance as Contri_Biker_Conveyance,
  2088. //
  2089. // (shipment_ratio/shipment_ratio_total)*Central_Team as Contri_Central_Team,
  2090. // (shipment_ratio/shipment_ratio_total)*HRM as Contri_HRM,
  2091. // (shipment_ratio/shipment_ratio_total)*MHTCRent_Security as Contri_MHTCRent_Security,
  2092. // (shipment_ratio/shipment_ratio_total)*LMDHITL_Security as Contri_LMDHITL_Security,
  2093. // (shipment_ratio/shipment_ratio_total)*Incentives as Contri_Incentives,
  2094. // (shipment_ratio/shipment_ratio_total)*Consumables as Contri_Consumables,
  2095. // (shipment_ratio/shipment_ratio_total)*Communication as Contri_Communication,
  2096. // (shipment_ratio/shipment_ratio_total)*MHTC_Manpower as Contri_MHTC_Manpower,
  2097. // if(shipmentPaymentType='COD',(shipment_ratio/shipment_ratio_total_COD)*Collection_Fixed,0) as Contri_Collection_Fixed,
  2098. // if(shipmentPaymentType='COD',(order_item_value/order_item_value_total)*Collection_Variable,0) as Contri_Collection_Variable
  2099. //resident shipment_details;
  2100. ////
  2101. //shipment_detailsForQVD:
  2102. ////left join(shipment_details)
  2103. //Load merchant_reference_idShip,
  2104. // product_id_final,
  2105. // Contri_FE_Salary_Marketplace,
  2106. // Contri_Van_Conveyance_Marketplace,
  2107. // Contri_FE_Salary_Van,
  2108. // Contri_FE_Salary_Bike,
  2109. // Contri_Van_Conveyance,
  2110. // Contri_Biker_Conveyance,
  2111. // Contri_Central_Team,
  2112. // Contri_HRM,
  2113. // Contri_MHTCRent_Security,
  2114. // Contri_LMDHITL_Security,
  2115. // Contri_Incentives,
  2116. // Contri_Consumables,
  2117. // Contri_Communication,
  2118. // Contri_MHTC_Manpower,
  2119. // Contri_Collection_Fixed,
  2120. // Contri_Collection_Variable,
  2121. //
  2122. // Contri_FE_Salary_Marketplace+
  2123. // Contri_Van_Conveyance_Marketplace+
  2124. // Contri_FE_Salary_Van+
  2125. // Contri_FE_Salary_Bike+
  2126. // Contri_Van_Conveyance+
  2127. // Contri_Biker_Conveyance+
  2128. // Contri_Central_Team+
  2129. // Contri_HRM+
  2130. // Contri_MHTCRent_Security+
  2131. // Contri_LMDHITL_Security+
  2132. // Contri_Incentives+
  2133. // Contri_Consumables+
  2134. // Contri_Communication+
  2135. // Contri_MHTC_Manpower+
  2136. // Contri_Collection_Fixed+
  2137. // Contri_Collection_Variable as Cost,
  2138. //
  2139. //
  2140. // shipment_typeShip,
  2141. // if(merchant_codeShip='WSR','WSR','NonWSR') as isWSR
  2142. // //'Y' as isWSR
  2143. //Resident shipment_details;
  2144. //
  2145. //store shipment_detailsForQVD into [$(qvdPath_fsd)fsd_LMD_Cost.qvd](qvd);
  2146. //////
  2147. //drop table shipment_detailsForQVD;
  2148. //
  2149. ///$tab Pending Reco
  2150. left keep(Run_Hub_Final)
  2151. PendingReco:
  2152. LOAD //reconciliationId,
  2153. shipmentId as tracking_IDReco,
  2154. hubId as fsd_HubId,
  2155. wasPendingInSystem,
  2156. wasPendingInHub,
  2157. dayname(updateDateTime) as updateDatePendingReco,
  2158. if(hour(updateDateTime)>=0 and hour(updateDateTime)<=2,dayname(updateDateTime)-1,dayname(updateDateTime)) as updateDatePendingRecoAdj,
  2159. updateDateTime as updateDateTimePendingReco,
  2160. if (DayName(updateDateTime)=DayName(Today(1)-1),1,0) as updateDatePendingRecoAdjYesterday
  2161.  
  2162. FROM
  2163. [$(qvdPath_fsd)fsd_pendingReconciliation.qvd]
  2164. (qvd);
  2165. ///$tab mail_config
  2166. /* Mail Config Tab
  2167. * This will contains tables containing your mail requirement
  2168. * Name of the tab could be anything
  2169. * Make sure you follow the table convention, table names/columns names etc.
  2170. */
  2171.  
  2172. /* Variables if you want to use any */
  2173. let today = Today(1);
  2174. let yesterday=date(Today(1)-1);
  2175. let posDate=date(Today(1)-4);
  2176. set note = 'Total Month Sales: '&$(totalMonthSales);
  2177. let excelAttachVanHub = 'Van Report Hub '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2178. let excelAttachVanCity = 'Van Report City '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2179. let excelAttachVanRaw = 'Van Report Raw Data '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2180. let excelAttachMPVan = 'MP Van Report Hub '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2181. let excelAttachMPVanRaw = 'MP Van Report Raw Data '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2182. let excelAttachSmartHub = 'Smart Devices Report Hub '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2183. let excelAttachIntDevicesHub = 'Integrated Devices Report Hub '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2184. let excelAttachIntDevicesHubDetail = 'Integrated Devices Report Hub Detail '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2185. let excelAttachIntDevicesCityDetail = 'Integrated Devices Report City Detail '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2186. let excelAttachIntDevicesFEDetail = 'Integrated Devices Report FE Detail '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2187.  
  2188.  
  2189. let excelAttachSmartRaw = 'Smart Devices Raw Data '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2190. let excelAttachVol = 'Volumetric Raw Data -'&day(Today(-1))&'-'&monthname(today(-1))&'.xls';
  2191. let excelAttachPOSHub = 'POS Devices Report Hub '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2192. let excelAttachPOSFrauHub = 'POS Devices Report Hub '&date(Today(1)-4, 'DD-MMM-YY')&'.xls';
  2193. let excelAttachPOSRaw = 'POS Devices Report Raw Data '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2194. let excelAttachPOSPLRaw = 'Pinelab Devices Report Raw Data '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2195. let excelAttachPOSTrackingRaw = 'POS Devices Report Raw Data '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2196. let excelAttachPOSReconHub = 'POS Devices Recon Report Hub '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2197. let excelAttachPOSPLHub = 'Pinelabs Devices Report Hub '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2198. let excelAttachPOSReconCity = 'POS Devices Recon Report City '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2199. let excelAttachPOSPLCity = 'Pinelabs Devices Report City '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2200. let excelAttachPOSReconRaw = 'POS Devices Recon Report Raw '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2201. let excelAttachMShipmentRaw = 'Shipment Raw Data '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2202. let excelAttachRecOFDCity = 'Receive OFD Report City '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2203. let excelAttachRecOFDHub = 'Receive OFD Report Hub '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2204.  
  2205. let excelAttachRecHourly = 'Receive Hourly'&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2206. let excelAttachOFDHourly = 'OFD Hourly'&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2207. let excelAttachDelHourly = 'Delivered Hourly'&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2208. let excelAttachProdHourly = 'Producitivity Hourly '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2209. let excelAttachDeviceHourly = 'Device Hourly'&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2210.  
  2211.  
  2212. let excelAttachEKLDHCity = 'EKL DH Report City '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2213. let excelAttachFEProdHub = 'FE Prod Hub '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2214. let excelAttachFEProdCity ='FE Prod City '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2215.  
  2216.  
  2217. let excelAttachVanCityDelivery = 'Van Report City Delivery'&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2218. let excelAttachVanHubDelivery = 'Van Report Hub Delivery'&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2219. let excelAttachVanRawDelivery = 'Van Report Raw Delivery'&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2220.  
  2221. let excelAttachVanCityMP = 'Van Report City MP'&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2222. let excelAttachVanHubMP = 'Van Report Hub MP'&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2223. let excelAttachVanRawMP = 'Van Report Raw MP'&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2224.  
  2225. let excelAttachPendingRecoRaw = 'Pending Reco Raw'&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2226. let excelAttachCashRecoRaw = 'Cash Reco Raw'&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2227.  
  2228. let excelAttachFEProdCityDelivery = 'FE Prod City Delivery '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2229. let excelAttachFEProdHubDelivery = 'FE Prod Hub Delivery '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2230. let excelAttachFEProdCityMP = 'FE Prod City MP '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2231. let excelAttachFEProdHubMP = 'FE Prod Hub MP '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2232. let excelAttachFEProdRaw = 'FE Prod Raw '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2233.  
  2234. //"mail_1","config_1"
  2235.  
  2236. //"mail_2","config_2"
  2237. //"mail_3","config_3"
  2238. //"mail_7","config_7"
  2239. //"mail_8","config_8"
  2240. /* This Table stores no. of mails you want to send and mail_id, config_id corresponding to it. */
  2241. MailEntity:
  2242. LOAD * Inline
  2243. [ mailId, mailConfigId
  2244. "mail_4","config_4"
  2245. "mail_5","config_5"
  2246. "mail_6","config_6"
  2247. "mail_9","config_9"
  2248. "mail_10","config_10"
  2249. "mail_11","config_11"
  2250. "mail_12","config_12"
  2251. "mail_13","config_13"
  2252. "mail_14","config_14"
  2253. ];
  2254.  
  2255.  
  2256. /*
  2257. *For each Mail_id/config_id, table stores mail related informantion
  2258. *mailConfigId = foreign key from MailEntiy
  2259. */
  2260. //"config_4", "toList", "nirjhar.bhattacharya@flipkart.com"
  2261. //"config_4", "ccList", "nirjhar.bhattacharya@flipkart.com"
  2262. //"config_4", "fromEmail", "nirjhar.bhattacharya@flipkart.com"
  2263. //"config_4", "ReplyToEmail", "nirjhar.bhattacharya@flipkart.com"
  2264. //"config_4", "mailSubject", Shipment Raw Data: $(yesterday)
  2265. //"config_4", "textBody",'Hi, <br>PFA the shipment Raw Data $(yesterday)</br>'
  2266.  
  2267.  
  2268. //"config_1", "toList","nirjhar.bhattacharya@flipkart.com"
  2269. //"config_1", "ccList", "nirjhar.bhattacharya@flipkart.com"
  2270. //"config_1", "fromEmail", "nirjhar.bhattacharya@flipkart.com"
  2271. //"config_1", "ReplyToEmail", "nirjhar.bhattacharya@flipkart.com"
  2272. //"config_1", "mailSubject", Linehaul/DH Hour Wise Report: $(yesterday)
  2273. //"config_1", "textBody",'Hi, <br>PFA the Linehaul/DH Hour Wise Report for $(yesterday)</br>'
  2274. //
  2275. //"config_2", "toList", "nirjhar.bhattacharya@flipkart.com"
  2276. //"config_2", "ccList", "nirjhar.bhattacharya@flipkart.com"
  2277. //"config_2", "fromEmail", "nirjhar.bhattacharya@flipkart.com"
  2278. //"config_2", "ReplyToEmail", "nirjhar.bhattacharya@flipkart.com"
  2279. //"config_2", "mailSubject", Smart Devices Report : $(yesterday)
  2280. //"config_2", "textBody",'Hi, <br>PFA the smart devices report for $(yesterday)</br>'
  2281. //
  2282. //"config_3", "toList", "nirjhar.bhattacharya@flipkart.com>"
  2283. //"config_3", "ccList", "nirjhar.bhattacharya@flipkart.com"
  2284. //"config_3", "fromEmail", "nirjhar.bhattacharya@flipkart.com"
  2285. //"config_3", "ReplyToEmail", "nirjhar.bhattacharya@flipkart.com"
  2286. //"config_3", "mailSubject", POS Devices Report : $(yesterday)
  2287. //"config_3", "textBody",'Hi, <br>PFA the POS devices report for $(yesterday)</br>'
  2288.  
  2289.  
  2290. //"config_7", "toList", "nirjhar.bhattacharya@flipkart.com"
  2291. //"config_7", "ccList", "nirjhar.bhattacharya@flipkart.com"
  2292. //"config_7", "fromEmail", "nirjhar.bhattacharya@flipkart.com"
  2293. //"config_7", "ReplyToEmail", "nirjhar.bhattacharya@flipkart.com"
  2294. //"config_7", "mailSubject",FE Productivity/Attendance Report: $(yesterday)
  2295. //"config_7", "textBody",'Hi, <br>PFA the Productivity/Attendance Report $(yesterday)</br>'
  2296. //
  2297. //"config_8", "toList", "nirjhar.bhattacharya@flipkart.com"
  2298. //"config_8", "ccList", "nirjhar.bhattacharya@flipkart.com"
  2299. //"config_8", "fromEmail", "nirjhar.bhattacharya@flipkart.com"
  2300. //"config_8", "ReplyToEmail", "nirjhar.bhattacharya@flipkart.com"
  2301. //"config_8", "mailSubject",POS ERP-MIS Mismatch Report: $(posDate)
  2302. //"config_8", "textBody",'Hi, <br>PFA the POS ERP-MIS Mismatch Report $(posDate)</br>'
  2303.  
  2304. MailConfigEntity:
  2305. LOAD * inline
  2306. [mailConfigId, configKey, configValue
  2307.  
  2308.  
  2309.  
  2310. "config_5", "toList", "kunwar.ak@flipkart.com"
  2311. "config_5", "ccList", "nirjhar.bhattacharya@flipkart.com"
  2312. "config_5", "fromEmail", "nirjhar.bhattacharya@flipkart.com"
  2313. "config_5", "ReplyToEmail", "nirjhar.bhattacharya@flipkart.com"
  2314. "config_5", "mailSubject",Receive/OFD Timeline Report: $(yesterday)
  2315. "config_5", "textBody",'Hi, <br>PFA the Receive/OFD Timeline Report $(yesterday)</br>'
  2316.  
  2317. "config_6", "toList", "kunwar.ak@flipkart.com"
  2318. "config_6", "ccList", "nirjhar.bhattacharya@flipkart.com"
  2319. "config_6", "fromEmail", "kunwar.ak@flipkart.com"
  2320. "config_6", "ReplyToEmail", "nirjhar.bhattacharya@flipkart.com"
  2321. "config_6", "mailSubject",EKL DH Report: $(yesterday)
  2322. "config_6", "textBody",'Hi, <br>PFA the EKL DH Report $(yesterday)</br>'
  2323.  
  2324.  
  2325. "config_9", "toList", "kunwar.ak@flipkart.com"
  2326. "config_9", "ccList", "nirjhar.bhattacharya@flipkart.com"
  2327. "config_9", "fromEmail", "nirjhar.bhattacharya@flipkart.com"
  2328. "config_9", "ReplyToEmail", "nirjhar.bhattacharya@flipkart.com"
  2329. "config_9", "mailSubject",Devices Integrated Report $(yesterday)
  2330. "config_9", "textBody",'Hi, <br>PFA the Devices Integrated Report for $(yesterday)</br>'
  2331.  
  2332. "config_10", "toList","kunwar.ak@flipkart.com"
  2333. "config_10", "ccList", "nirjhar.bhattacharya@flipkart.com"
  2334. "config_10", "fromEmail", "nirjhar.bhattacharya@flipkart.com"
  2335. "config_10", "ReplyToEmail", "nirjhar.bhattacharya@flipkart.com"
  2336. "config_10", "mailSubject", Van Report : $(yesterday)
  2337. "config_10", "textBody",'Hi, <br>PFA the van report for $(yesterday)</br>'
  2338.  
  2339. "config_11", "toList", "kunwar.ak@flipkart.com"
  2340. "config_11", "ccList", "nirjhar.bhattacharya@flipkart.com"
  2341. "config_11", "fromEmail", "nirjhar.bhattacharya@flipkart.com"
  2342. "config_11", "ReplyToEmail", "nirjhar.bhattacharya@flipkart.com"
  2343. "config_11", "mailSubject",FE Productivity/Attendance Report: $(yesterday)
  2344. "config_11", "textBody",'Hi, <br>PFA the Productivity/Attendance Report $(yesterday)</br>'
  2345.  
  2346. "config_12", "toList", "kunwar.ak@flipkart.com"
  2347. "config_12", "ccList", "nirjhar.bhattacharya@flipkart.com"
  2348. "config_12", "fromEmail", "nirjhar.bhattacharya@flipkart.com"
  2349. "config_12", "ReplyToEmail", "nirjhar.bhattacharya@flipkart.com"
  2350. "config_12", "mailSubject",NDR Compliance Report: $(yesterday)
  2351. "config_12", "textBody",'Hi, <br>PFA the NDR Compliance Report $(yesterday)</br>'
  2352.  
  2353.  
  2354. "config_13", "toList", "kunwar.ak@flipkart.com"
  2355. "config_13", "ccList", "nirjhar.bhattacharya@flipkart.com"
  2356. "config_13", "fromEmail", "nirjhar.bhattacharya@flipkart.com"
  2357. "config_13", "ReplyToEmail", "nirjhar.bhattacharya@flipkart.com"
  2358. "config_13", "mailSubject",Goods and Cash Reconciliation Report : $(yesterday)
  2359. "config_13", "textBody",'Hi, <br>PFA the Pending Reconciliation Report $(yesterday)</br>'
  2360.  
  2361.  
  2362. "config_14", "toList", "kunwar.ak@flipkart.com"
  2363. "config_14", "ccList", "nirjhar.bhattacharya@flipkart.com"
  2364. "config_14", "fromEmail", "nirjhar.bhattacharya@flipkart.com"
  2365. "config_14", "ReplyToEmail", "nirjhar.bhattacharya@flipkart.com"
  2366. "config_14", "mailSubject",Devices Integrated Report $(yesterday)
  2367. "config_14", "textBody",'Hi, <br>PFA the Devices Integrated Report for $(yesterday)</br>'
  2368.  
  2369. ];
  2370.  
  2371.  
  2372. //"config_5", "toList", "nirjhar.bhattacharya@flipkart.com"
  2373. //"config_5", "ccList", "nirjhar.bhattacharya@flipkart.com"
  2374. //"config_5", "fromEmail", "nirjhar.bhattacharya@flipkart.com"
  2375. //"config_5", "ReplyToEmail", "nirjhar.bhattacharya@flipkart.com"
  2376. //"config_5", "mailSubject",Receive/OFD Timeline Report: $(yesterday)
  2377. //"config_5", "textBody",'Hi, <br>PFA the Receive/OFD Timeline Report $(yesterday)</br>'
  2378. //
  2379.  
  2380. /*
  2381. * For each Mail, different attachments it has
  2382. * Each file represents one attachments
  2383. * fileType : attachment/mailbody
  2384. * fileAttachType: excel/image/html (excel only if filetype = attachment)
  2385. * fileName : Temp file name for each fileId
  2386. * fileId : Unique key for each row
  2387. * mailConfigId : foreign key from MailEntity
  2388. */
  2389. //AttachmentEntity:
  2390. //LOAD * INLINE [
  2391. // mailConfigId, fileId, fileName, fileType, fileAttachType
  2392. // config_1, file1, $(excelAttachVan), attachment, excel
  2393. // config_1, file2, table1.html, mailbody, html
  2394. // config_1, file3, table2.html, mailbody, html
  2395. //
  2396. // config_2, file4, $(excelAttachSmart), attachment, excel
  2397. // config_2, file5, table3.html, mailbody, html
  2398. //
  2399. // config_3, file6, $(excelAttachVol), attachment, excel
  2400. // config_3, file7, table4.html, mailbody, html
  2401. //
  2402. //];
  2403. //config_4, file16, $(excelAttachMShipmentRaw), attachment, excel
  2404.  
  2405. AttachmentEntity:
  2406. LOAD * INLINE [
  2407. mailConfigId, fileId, fileName, fileType, fileAttachType
  2408.  
  2409. config_1, file1, table1.html, mailbody, image
  2410. config_1, file2, table2.html, mailbody, image
  2411. config_1, file3, table3.html, mailbody, image
  2412. config_1, file4, table3.html, mailbody, image
  2413. config_1, file5, $(excelAttachVanCity), attachment, excel
  2414. config_1, file6, $(excelAttachVanHub), attachment, excel
  2415.  
  2416. config_2, file7, table1.html, mailbody, html
  2417. config_2, file8, $(excelAttachSmartHub), attachment, excel
  2418. config_2, file9, $(excelAttachSmartRaw), attachment, excel
  2419.  
  2420. config_3, file10, table1.html, mailbody, html
  2421. config_3, file30, table2.html, mailbody, html
  2422. config_3, file11, $(excelAttachPOSHub), attachment, excel
  2423. config_3, file12, $(excelAttachPOSRaw), attachment, excel
  2424. config_3, file13, $(excelAttachPOSReconCity), attachment, excel
  2425. config_3, file14, $(excelAttachPOSReconHub), attachment, excel
  2426. config_3, file15, $(excelAttachPOSReconRaw), attachment, excel
  2427. config_3, file31, $(excelAttachPOSPLHub), attachment, excel, mailbody, html
  2428. config_3, file36, $(excelAttachPOSPLRaw), attachment, excel, mailbody, html
  2429.  
  2430.  
  2431. config_5, file17, table1.html, mailbody, html
  2432. config_5, file18, table2.html, mailbody, html
  2433. config_5, file19, $(excelAttachRecOFDCity), attachment, excel
  2434. config_5, file20, $(excelAttachRecOFDHub), attachment, excel
  2435. config_5, file73, $(excelAttachRecHourly), attachment, excel
  2436. config_5, file74, $(excelAttachOFDHourly), attachment, excel
  2437. config_5, file75, $(excelAttachDelHourly), attachment, excel
  2438. config_5, file76, $(excelAttachProdHourly), attachment, excel
  2439. config_5, file77, $(excelAttachDeviceHourly), attachment, excel
  2440.  
  2441. config_6, file21, table1.html, mailbody, html
  2442. config_6, file22, table2.html, mailbody, html
  2443. config_6, file23, $(excelAttachEKLDHCity), attachment, excel
  2444. config_6, file24, table4.html, mailbody, html
  2445.  
  2446. config_7, file25, table1.html, mailbody, html
  2447. config_7, file26, table2.html, mailbody, html
  2448. config_7, file27, table3.html, mailbody, html
  2449. config_7, file28, $(excelAttachFEProdCity), attachment, excel
  2450. config_7, file29, $(excelAttachFEProdHub), attachment, excel
  2451.  
  2452. config_8, file32, table1.html, mailbody, html
  2453. config_8, file33, $(excelAttachPOSTrackingRaw), attachment, excel
  2454.  
  2455. config_9, file34, table1.html, mailbody, html
  2456. config_9, file35, $(excelAttachIntDevicesHub), attachment, excel
  2457.  
  2458. config_10, file37, table1.html, mailbody, html
  2459. config_10, file38, table2.html, mailbody, html
  2460. config_10, file39, table3.html, mailbody, html
  2461. config_10, file40, table4.html, mailbody, html
  2462. config_10, file41, $(excelAttachVanCityDelivery), attachment, excel
  2463. config_10, file42, $(excelAttachVanHubDelivery), attachment, excel
  2464. config_10, file43, $(excelAttachVanRawDelivery), attachment, excel
  2465. config_10, file44, $(excelAttachVanCityMP), attachment, excel
  2466. config_10, file45, $(excelAttachVanHubMP), attachment, excel
  2467. config_10, file46, $(excelAttachVanRawMP), attachment, excel
  2468.  
  2469. config_11, file47, table1.html, mailbody, html
  2470. config_11, file48, table2.html, mailbody, html
  2471. config_11, file49, table3.html, mailbody, html
  2472. config_11, file50, table4.html, mailbody, html
  2473. config_11, file51, $(excelAttachFEProdCityDelivery), attachment, excel
  2474. config_11, file52, $(excelAttachFEProdHubDelivery), attachment, excel
  2475. config_11, file53, $(excelAttachFEProdCityMP), attachment, excel
  2476. config_11, file54, $(excelAttachFEProdHubMP), attachment, excel
  2477. config_11, file72, $(excelAttachFEProdRaw), attachment, excel
  2478.  
  2479. config_12, file55, table1.html, mailbody, html
  2480. config_12, file56, table2.html, mailbody, html
  2481.  
  2482. config_13, file57, table1.html, mailbody, html
  2483. config_13, file58, table2.html, mailbody, html
  2484. config_13, file71, $(excelAttachPendingRecoRaw), attachment, excel
  2485. config_13, file78, table3.html, mailbody, html
  2486. config_13, file79, table4.html, mailbody, html
  2487. config_13, file80, $(excelAttachPendingRecoRaw), attachment, excel
  2488.  
  2489.  
  2490. config_14, file69, table1.html, mailbody, html
  2491. config_14, file70, table2.html, mailbody, html
  2492. config_14, file59, table3.html, mailbody, html
  2493. config_14, file60, table4.html, mailbody, html
  2494. config_14, file61, table5.html, mailbody, html
  2495. config_14, file62, table6.html, mailbody, html
  2496.  
  2497.  
  2498. config_14, file63, $(excelAttachIntDevicesCityDetail), attachment, excel
  2499. config_14, file64, $(excelAttachIntDevicesHubDetail), attachment, excel
  2500. config_14, file65, $(excelAttachIntDevicesFEDetail), attachment, excel
  2501. config_14, file66, $(excelAttachPOSHub), attachment, excel
  2502. config_14, file67, $(excelAttachPOSPLHub), attachment, excel
  2503. config_14, file68, $(excelAttachSmartHub), attachment, excel
  2504. ];
  2505.  
  2506.  
  2507.  
  2508.  
  2509. // config_5, file16, table1.html, mailbody, html
  2510. // config_5, file17, table2.html, mailbody, html
  2511. // config_5, file18, $(excelAttachRecOFDCity), attachment, excel
  2512. // config_5, file19, $(excelAttachRecOFDHub), attachment, excel
  2513. /*
  2514. config_3, file15, table1.html, mailbody, html
  2515. config_3, file16, $(excelAttachPOSReconHub), attachment, excel
  2516. * For each File, stores different Objects it can have
  2517. * Each Object represents one object from front end
  2518. * if File corresponds to 'excel' filetype, it requires objTabName, objToSelect ,objComments,objCellPos,objType info
  2519. * objTabName = Name of tab in Excel sheet
  2520. * objToSelect = Front end obj to copy/export
  2521. * objComments = Any comments associated with the table copied to excel, put "" (empty) if no comments
  2522. * objCellPos = Cell no in excel from where you want to copy into excel sheet. Eg: A1,A4(if any comments)
  2523. * objType = Type of object, Data/image/html. Eg: Tables: Data, Charts/graphs: image
  2524. * objId = Unique id for each row
  2525. * fileId = foreign key from AttachmentEntity
  2526. */
  2527. //ObjectEntity:
  2528. //Load * Inline
  2529. //[ fileId,objId,objTabName, objToSelect ,objComments,objCellPos,objType
  2530. //
  2531. // "file1","obj1","$(excelAttachVan)", "CH37", "","A2","Data"
  2532. // "file2","obj2","Van Report Zone", "CH35", "","A2","Data"
  2533. // "file3","obj3","Van Report City", "CH36", "","A2","Data"
  2534. //
  2535. //
  2536. // "file4","obj4","$(excelAttachSmart)", "CH21", "","A2","Data"
  2537. // "file5","obj5","Smart Devices Report Hub", "CH23", "","A2","Data"
  2538. //
  2539. //
  2540. // "file6","obj6","$(excelAttachSmart)", "CH21", "","A2","Data"
  2541. // "file7","obj7","Volumetric Report Hub", "CH22", "","A2","Data"
  2542. //
  2543. //];
  2544.  
  2545. //"file16","obj16","Shipment Raw Data", "TB44", "","A2","Data"
  2546.  
  2547. ObjectEntity:
  2548. Load * Inline
  2549. [ fileId,objId,objTabName, objToSelect ,objComments,objCellPos,objType
  2550.  
  2551.  
  2552. "file1","obj1","Received Hourly", "CH340", "","","image"
  2553. "file2","obj2","OFD Hourly", "CH341", "","","image"
  2554. "file3","obj3","Delivered Hourly", "CH339", "","","image"
  2555. "file4","obj4","Devices Delivered Hourly", "CH338", "","","image"
  2556. "file5","obj5","Van Report City All", "CH147", "","A2","Data"
  2557. "file6","obj6","Van Report Hub All", "CH191", "","A2","Data"
  2558.  
  2559. "file7","obj7","Smart Report City", "CH211", "","","html"
  2560. "file8","obj8","Smart Report Hub ", "CH212", "","A2","Data"
  2561. "file9","obj9","Smart Report Raw Data", "CH113", "","A2","Data"
  2562.  
  2563. "file10","obj10","POS Devices Report City", "CH162", "","","html"
  2564. "file11","obj11","POS Devices Report Hub ", "CH160", "","A2","Data"
  2565. "file12","obj12","POS Devices Report Raw Data", "CH159", "","A2","Data"
  2566.  
  2567. "file13","obj13","POS Recon Report City", "CH163","","A2","Data"
  2568. "file14","obj14","POS Recon Report Hub", "CH164", "","A2","Data"
  2569. "file15","obj15","POS Recon Raw Data", "TB34", "","A2","Data"
  2570. "file30","obj30","Pinelabs Devices Report City", "CH210", "","","html"
  2571. "file31","obj31","Pinelabs Devices Report Hub", "CH209", "","A2","Data"
  2572. "file36","obj36","Pinelabs Devices Report Raw", "CH238", "","A2","Data"
  2573.  
  2574.  
  2575.  
  2576. "file17","obj17","Receive OFD Zone", "CH175", "","","html"
  2577. "file18","obj18","Receive OFD State", "CH176", "","","html"
  2578. "file19","obj19","Receive OFD City", "CH177", "","A2","Data"
  2579. "file20","obj20","Receive OFD Hub", "CH178", "","A2","Data"
  2580.  
  2581. "file73","obj73","Receive Hourly", "CH306", "","A2","Data"
  2582. "file74","obj74","OFD Hourly", "CH307", "","A2","Data"
  2583. "file75","obj75","Delivered Hourly", "CH311", "","A2","Data"
  2584. "file76","obj76","Productivity Hourly", "CH304", "","A2","Data"
  2585. "file77","obj77","Devices Hourly", "CH309", "","A2","Data"
  2586.  
  2587.  
  2588. "file21","obj21","EKL DH Zone", "CH188", "","","html"
  2589. "file22","obj22","EKL DH State", "CH189", "","","html"
  2590. "file23","obj23","EKL DH City", "CH187", "","A2","Data"
  2591. "file24","obj24","EKL DH Hub", "CH186", "","","html"
  2592.  
  2593. "file25","obj25","FE Prod Zone", "CH205", "","","html"
  2594. "file26","obj26","FE Prod City", "CH204", "","","html"
  2595. "file27","obj27","FE Prod Hub", "CH200", "","","html"
  2596. "file28","obj28","FE Prod City", "CH204", "","A2","Data"
  2597. "file29","obj29","FE Prod Hub", "CH200", "","A2","Data"
  2598.  
  2599. "file32","obj32","POS ERP-MIS Mismatch Hub", "CH213", "","","html"
  2600. "file33","obj33","POS ERP-MIS Mismatch Hub Raw", "TB46", "","A2","Data"
  2601.  
  2602. "file34","obj34","Integrated Devices Report City ", "CH253", "","","html"
  2603. "file35","obj35","Integrated Devices Report Hub", "CH226", "","A2","Data"
  2604.  
  2605. "file37","obj37","Van Report Zone Deliveries", "CH248", "","","html"
  2606. "file38","obj38","Van Report Top City Deliveries", "CH230", "","","html"
  2607. "file39","obj39","Van Report Zone MP", "CH231", "","","html"
  2608. "file40","obj40","Van Report Top City MP", "CH234", "","","html"
  2609. "file41","obj41","Van Report City Deliveries", "CH230", "","A2","Data"
  2610. "file42","obj42","Van Report Hub Deliveries", "CH249", "","A2","Data"
  2611. "file43","obj43","Van Report Raw Deliveries", "CH225", "","A2","Data"
  2612. "file44","obj44","Van Report City MP", "CH234", "","A2","Data"
  2613. "file45","obj45","Van Report Hub MP", "CH235", "","A2","Data"
  2614. "file46","obj46","Van Report Raw MP", "CH245", "","A2","Data"
  2615.  
  2616. "file47","obj47","FE Prod Zone Deliveries", "CH237", "","","html"
  2617. "file48","obj48","FE Prod Top City Deliveries", "CH240", "","","html"
  2618. "file49","obj49","FE Prod Zone MP", "CH250", "","","html"
  2619. "file50","obj50","FE Prod Top City MP", "CH242","","","html"
  2620. "file51","obj51","FE Prod City Deliveries", "CH240", "","A2","Data"
  2621. "file52","obj52","FE Prod Hub Deliveries", "CH241", "","A2","Data"
  2622. "file53","obj53","FE Prod City MP ", "CH226", "","A2","Data"
  2623. "file54","obj54","FE Prod Hub MP", "CH243", "","A2","Data"
  2624. "file72","obj72","FE Prod Raw Data", "CH323", "","A2","Data"
  2625.  
  2626. "file55","obj55","NDR City", "CH260", "","A2","Data"
  2627. "file56","obj56","NRD Hub", "CH259", "","A2","Data"
  2628.  
  2629. "file57","obj57","Pending Reconciliation Report City", "CH322", "","","html"
  2630. "file58","obj58","Pending Reconciliation Report Hub", "CH321", "","","html"
  2631. "file71","obj71","Pending Report Raw Data", "TB60", "","A2","Data"
  2632. "file78","obj78","Cash Reconciliation Report City", "CH300", "","","html"
  2633. "file79","obj79","Cash Reconciliation Report Hub", "CH313", "","","html"
  2634. "file80","obj80","Cash Reconciliation Report Hub", "TB56", "","","html"
  2635.  
  2636. "file59","obj59","Integrated Device Report City(Summary)", "CH279", "","","html"
  2637. "file60","obj60","POS Report City(Summary)", "CH277", "","","html"
  2638. "file61","obj61","Pinelab Report City(Summary)", "CH278", "","","html"
  2639. "file62","obj62","Smart Devices Report city(Summary)", "CH283", "","","html"
  2640.  
  2641. "file69","obj69","Integrated Device Report Zone", "CH324", "","A2","Data"
  2642. "file70","obj70","Integrated Device Report Region", "CH325", "","A2","Data"
  2643. "file63","obj63","Integrated Device Report City", "CH289", "","A2","Data"
  2644. "file64","obj64","Integrated Device Report Hub", "CH290", "","A2","Data"
  2645. "file65","obj65","Integrated Device Report FE", "CH291", "","A2","Data"
  2646. "file66","obj66","POS Hub", "CH292", "","A2","Data"
  2647. "file67","obj67","Pinelabs Hub", "CH293", "","A2","Data"
  2648. "file68","obj68","Smart Devices Hub", "CH295", "","A2","Data"
  2649. ];
  2650.  
  2651. // "file16","obj16","Receive/OFD Zone", "CH167", "","","html"
  2652. // "file17","obj17","Receive/OFD State", "CH174", "","","html"
  2653. // "file18","obj18","Receive/OFD City", "CH168", "","A2","Data"
  2654. // "file19","obj19","Receive/OFD Hub", "CH158", "","A2","Data"
  2655.  
  2656.  
  2657. /*
  2658. "file15","obj15","POS Devices Reconciliation Report City", "CH119", "","","html"
  2659. "file16","obj16","POS Devices Reconciliation Report Hub", "CH116", "","A2","Data"
  2660. * For each Object to copy, stores different selections it requires before mailing
  2661. * Each Object will represents one selectionBoxId from front end
  2662. * This SelectionBox will be created and stored on front-end using snapshot button
  2663. * You can have same selection for different objects
  2664. * objId : primary key and foreign key
  2665. */
  2666. //SelectionEnity:
  2667. //Load * Inline
  2668. //[ objId, selectionBoxId
  2669. // "obj1","selectionBox1"
  2670. // "obj2","selectionBox2"
  2671. // "obj3","selectionBox3"
  2672. // "obj4","selectionBox4"
  2673. // "obj5","selectionBox5"
  2674. // "obj6","selectionBox6"
  2675. // "obj7","selectionBox7"
  2676. // ];
  2677. // "obj16","selectionBox15"
  2678. SelectionEnity:
  2679. Load * Inline
  2680. [ objId, selectionBoxId
  2681. "obj1","selectionBox1"
  2682. "obj2","selectionBox2"
  2683. "obj3","selectionBox3"
  2684. "obj4","selectionBox4"
  2685. "obj5","selectionBox5"
  2686. "obj6","selectionBox6"
  2687. "obj7","selectionBox7"
  2688. "obj8","selectionBox8"
  2689.  
  2690. "obj9","selectionBox9"
  2691. "obj10","selectionBox10"
  2692. "obj11","selectionBox11"
  2693.  
  2694. "obj12","selectionBox12"
  2695. "obj13","selectionBox13"
  2696.  
  2697. "obj14","selectionBox14"
  2698. "obj15","selectionBox20"
  2699.  
  2700.  
  2701.  
  2702. "obj17","selectionBox16"
  2703. "obj18","selectionBox17"
  2704. "obj19","selectionBox18"
  2705. "obj20","selectionBox19"
  2706.  
  2707. "obj73","selectionBox73"
  2708. "obj74","selectionBox74"
  2709. "obj75","selectionBox75"
  2710. "obj76","selectionBox76"
  2711. "obj77","selectionBox77"
  2712.  
  2713. "obj21","selectionBox21"
  2714. "obj22","selectionBox22"
  2715. "obj23","selectionBox23"
  2716. "obj24","selectionBox24"
  2717.  
  2718. "obj25","selectionBox25"
  2719. "obj26","selectionBox26"
  2720. "obj27","selectionBox27"
  2721.  
  2722. "obj28","selectionBox28"
  2723. "obj29","selectionBox29"
  2724. "obj30","selectionBox30"
  2725. "obj31","selectionBox31"
  2726.  
  2727. "obj32","selectionBox32"
  2728. "obj33","selectionBox33"
  2729.  
  2730. "obj34","selectionBox34"
  2731. "obj35","selectionBox35"
  2732.  
  2733. "obj36","selectionBox36"
  2734. "obj37","selectionBox37"
  2735. "obj38","selectionBox38"
  2736. "obj39","selectionBox39"
  2737. "obj40","selectionBox40"
  2738. "obj41","selectionBox41"
  2739. "obj42","selectionBox42"
  2740. "obj43","selectionBox43"
  2741. "obj44","selectionBox44"
  2742. "obj45","selectionBox45"
  2743. "obj46","selectionBox46"
  2744. "obj47","selectionBox47"
  2745. "obj48","selectionBox48"
  2746. "obj49","selectionBox49"
  2747. "obj50","selectionBox50"
  2748. "obj51","selectionBox51"
  2749. "obj52","selectionBox52"
  2750. "obj53","selectionBox53"
  2751. "obj54","selectionBox54"
  2752. "obj72","selectionBox72"
  2753.  
  2754. "obj55","selectionBox55"
  2755. "obj56","selectionBox56"
  2756.  
  2757. "obj57","selectionBox57"
  2758. "obj58","selectionBox58"
  2759. "obj71","selectionBox71"
  2760. "obj78","selectionBox78"
  2761. "obj79","selectionBox79"
  2762. "obj80","selectionBox80"
  2763.  
  2764. "obj69","selectionBox69"
  2765. "obj70","selectionBox70"
  2766. "obj59","selectionBox59"
  2767. "obj60","selectionBox60"
  2768. "obj61","selectionBox61"
  2769. "obj62","selectionBox62"
  2770. "obj63","selectionBox63"
  2771. "obj64","selectionBox64"
  2772. "obj65","selectionBox65"
  2773. "obj66","selectionBox66"
  2774. "obj67","selectionBox67"
  2775. "obj68","selectionBox68"
  2776.  
  2777. ];
  2778.  
  2779. // "obj16","selectionBox16"
  2780. // "obj17","selectionBox17"
  2781. // "obj18","selectionBox17"
  2782. // "obj19","selectionBox17"
  2783. ///$tab mail_config_1
  2784. ///* Mail Config Tab
  2785. // * This will contains tables containing your mail requirement
  2786. // * Name of the tab could be anything
  2787. // * Make sure you follow the table convention, table names/columns names etc.
  2788. // */
  2789. //
  2790. ///* Variables if you want to use any */
  2791. //let today = Today(1);
  2792. //let yesterday=date(Today(1)-1);
  2793. //let posDate=date(Today(1)-4);
  2794. //set note = 'Total Month Sales: '&$(totalMonthSales);
  2795. //let excelAttachVanHub = 'Van Report Hub '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2796. //let excelAttachVanCity = 'Van Report City '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2797. //let excelAttachVanRaw = 'Van Report Raw Data '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2798. //let excelAttachMPVan = 'MP Van Report Hub '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2799. //let excelAttachMPVanRaw = 'MP Van Report Raw Data '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2800. //let excelAttachSmartHub = 'Smart Devices Report Hub '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2801. //let excelAttachIntDevicesHub = 'Integrated Devices Report Hub '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2802. //let excelAttachIntDevicesHubDetail = 'Integrated Devices Report Hub Detail '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2803. //let excelAttachIntDevicesCityDetail = 'Integrated Devices Report City Detail '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2804. //let excelAttachIntDevicesFEDetail = 'Integrated Devices Report FE Detail '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2805. //
  2806. //
  2807. //let excelAttachSmartRaw = 'Smart Devices Raw Data '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2808. //let excelAttachVol = 'Volumetric Raw Data -'&day(Today(-1))&'-'&monthname(today(-1))&'.xls';
  2809. //let excelAttachPOSHub = 'POS Devices Report Hub '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2810. //let excelAttachPOSFrauHub = 'POS Devices Report Hub '&date(Today(1)-4, 'DD-MMM-YY')&'.xls';
  2811. //let excelAttachPOSRaw = 'POS Devices Report Raw Data '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2812. //let excelAttachPOSPLRaw = 'Pinelab Devices Report Raw Data '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2813. //let excelAttachPOSTrackingRaw = 'POS Devices Report Raw Data '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2814. //let excelAttachPOSReconHub = 'POS Devices Recon Report Hub '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2815. //let excelAttachPOSPLHub = 'Pinelabs Devices Report Hub '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2816. //let excelAttachPOSReconCity = 'POS Devices Recon Report City '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2817. //let excelAttachPOSPLCity = 'Pinelabs Devices Report City '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2818. //let excelAttachPOSReconRaw = 'POS Devices Recon Report Raw '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2819. //let excelAttachMShipmentRaw = 'Shipment Raw Data '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2820. //let excelAttachRecOFDCity = 'Receive OFD Report City '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2821. //let excelAttachRecOFDHub = 'Receive OFD Report Hub '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2822. //
  2823. //let excelAttachRecHourly = 'Receive Hourly'&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2824. //let excelAttachOFDHourly = 'OFD Hourly'&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2825. //let excelAttachDelHourly = 'Delivered Hourly'&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2826. //let excelAttachProdHourly = 'Producitivity Hourly '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2827. //let excelAttachDeviceHourly = 'Device Hourly'&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2828. //
  2829. //
  2830. //let excelAttachEKLDHCity = 'EKL DH Report City '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2831. //let excelAttachFEProdHub = 'FE Prod Hub '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2832. //let excelAttachFEProdCity ='FE Prod City '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2833. //
  2834. //
  2835. //let excelAttachVanCityDelivery = 'Van Report City Delivery'&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2836. //let excelAttachVanHubDelivery = 'Van Report Hub Delivery'&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2837. //let excelAttachVanRawDelivery = 'Van Report Raw Delivery'&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2838. //
  2839. //let excelAttachVanCityMP = 'Van Report City MP'&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2840. //let excelAttachVanHubMP = 'Van Report Hub MP'&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2841. //let excelAttachVanRawMP = 'Van Report Raw MP'&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2842. //
  2843. //let excelAttachPendingRecoRaw = 'Pending Reco Raw'&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2844. //
  2845. //let excelAttachFEProdCityDelivery = 'FE Prod City Delivery '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2846. //let excelAttachFEProdHubDelivery = 'FE Prod Hub Delivery '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2847. //let excelAttachFEProdCityMP = 'FE Prod City MP '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2848. //let excelAttachFEProdHubMP = 'FE Prod Hub MP '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2849. //let excelAttachFEProdRaw = 'FE Prod Raw '&date(Today(1)-1, 'DD-MMM-YY')&'.xls';
  2850. //
  2851. ///* This Table stores no. of mails you want to send and mail_id, config_id corresponding to it. */
  2852. //MailEntity:
  2853. //LOAD * Inline
  2854. //[ mailId, mailConfigId
  2855. //"mail_1","config_1"
  2856. //"mail_2","config_2"
  2857. //"mail_3","config_3"
  2858. //"mail_4","config_4"
  2859. //"mail_5","config_5"
  2860. //"mail_6","config_6"
  2861. //"mail_7","config_7"
  2862. //"mail_8","config_8"
  2863. //"mail_9","config_9"
  2864. //"mail_10","config_10"
  2865. //"mail_11","config_11"
  2866. //"mail_12","config_12"
  2867. //"mail_13","config_13"
  2868. //"mail_14","config_14"
  2869. //];
  2870. //
  2871. //
  2872. ///*
  2873. //*For each Mail_id/config_id, table stores mail related informantion
  2874. //*mailConfigId = foreign key from MailEntiy
  2875. //*/
  2876. ////"config_4", "toList", "nirjhar.bhattacharya@flipkart.com"
  2877. ////"config_4", "ccList", "nirjhar.bhattacharya@flipkart.com"
  2878. ////"config_4", "fromEmail", "nirjhar.bhattacharya@flipkart.com"
  2879. ////"config_4", "ReplyToEmail", "nirjhar.bhattacharya@flipkart.com"
  2880. ////"config_4", "mailSubject", Shipment Raw Data: $(yesterday)
  2881. ////"config_4", "textBody",'Hi, <br>PFA the shipment Raw Data $(yesterday)</br>'
  2882. //
  2883. //
  2884. //MailConfigEntity:
  2885. //LOAD * inline
  2886. //[mailConfigId, configKey, configValue
  2887. //"config_1", "toList","nirjhar.bhattacharya@flipkart.com"
  2888. //"config_1", "ccList", "nirjhar.bhattacharya@flipkart.com"
  2889. //"config_1", "fromEmail", "nirjhar.bhattacharya@flipkart.com"
  2890. //"config_1", "ReplyToEmail", "nirjhar.bhattacharya@flipkart.com"
  2891. //"config_1", "mailSubject", Linehaul/DH Hour Wise Report: $(yesterday)
  2892. //"config_1", "textBody",'Hi, <br>PFA the Linehaul/DH Hour Wise Report for $(yesterday)</br>'
  2893. //
  2894. //"config_2", "toList", "nirjhar.bhattacharya@flipkart.com"
  2895. //"config_2", "ccList", "nirjhar.bhattacharya@flipkart.com"
  2896. //"config_2", "fromEmail", "nirjhar.bhattacharya@flipkart.com"
  2897. //"config_2", "ReplyToEmail", "nirjhar.bhattacharya@flipkart.com"
  2898. //"config_2", "mailSubject", Smart Devices Report : $(yesterday)
  2899. //"config_2", "textBody",'Hi, <br>PFA the smart devices report for $(yesterday)</br>'
  2900. //
  2901. //"config_3", "toList", "nirjhar.bhattacharya@flipkart.com>"
  2902. //"config_3", "ccList", "nirjhar.bhattacharya@flipkart.com"
  2903. //"config_3", "fromEmail", "nirjhar.bhattacharya@flipkart.com"
  2904. //"config_3", "ReplyToEmail", "nirjhar.bhattacharya@flipkart.com"
  2905. //"config_3", "mailSubject", POS Devices Report : $(yesterday)
  2906. //"config_3", "textBody",'Hi, <br>PFA the POS devices report for $(yesterday)</br>'
  2907. //
  2908. //
  2909. //"config_5", "toList", "nirjhar.bhattacharya@flipkart.com"
  2910. //"config_5", "ccList", "nirjhar.bhattacharya@flipkart.com"
  2911. //"config_5", "fromEmail", "nirjhar.bhattacharya@flipkart.com"
  2912. //"config_5", "ReplyToEmail", "nirjhar.bhattacharya@flipkart.com"
  2913. //"config_5", "mailSubject",Receive/OFD Timeline Report: $(yesterday)
  2914. //"config_5", "textBody",'Hi, <br>PFA the Receive/OFD Timeline Report $(yesterday)</br>'
  2915. //
  2916. //"config_6", "toList", "nirjhar.bhattacharya@flipkart.com"
  2917. //"config_6", "ccList", "nirjhar.bhattacharya@flipkart.com"
  2918. //"config_6", "fromEmail", "nirjhar.bhattacharya@flipkart.com"
  2919. //"config_6", "ReplyToEmail", "nirjhar.bhattacharya@flipkart.com"
  2920. //"config_6", "mailSubject",EKL DH Report: $(yesterday)
  2921. //"config_6", "textBody",'Hi, <br>PFA the EKL DH Report $(yesterday)</br>'
  2922. //
  2923. //"config_7", "toList", "nirjhar.bhattacharya@flipkart.com"
  2924. //"config_7", "ccList", "nirjhar.bhattacharya@flipkart.com"
  2925. //"config_7", "fromEmail", "nirjhar.bhattacharya@flipkart.com"
  2926. //"config_7", "ReplyToEmail", "nirjhar.bhattacharya@flipkart.com"
  2927. //"config_7", "mailSubject",FE Productivity/Attendance Report: $(yesterday)
  2928. //"config_7", "textBody",'Hi, <br>PFA the Productivity/Attendance Report $(yesterday)</br>'
  2929. //
  2930. //"config_8", "toList", "nirjhar.bhattacharya@flipkart.com"
  2931. //"config_8", "ccList", "nirjhar.bhattacharya@flipkart.com"
  2932. //"config_8", "fromEmail", "nirjhar.bhattacharya@flipkart.com"
  2933. //"config_8", "ReplyToEmail", "nirjhar.bhattacharya@flipkart.com"
  2934. //"config_8", "mailSubject",POS ERP-MIS Mismatch Report: $(posDate)
  2935. //"config_8", "textBody",'Hi, <br>PFA the POS ERP-MIS Mismatch Report $(posDate)</br>'
  2936. //
  2937. //"config_9", "toList", "nirjhar.bhattacharya@flipkart.com"
  2938. //"config_9", "ccList", "nirjhar.bhattacharya@flipkart.com"
  2939. //"config_9", "fromEmail", "nirjhar.bhattacharya@flipkart.com"
  2940. //"config_9", "ReplyToEmail", "nirjhar.bhattacharya@flipkart.com"
  2941. //"config_9", "mailSubject",Devices Integrated Report $(yesterday)
  2942. //"config_9", "textBody",'Hi, <br>PFA the Devices Integrated Report for $(yesterday)</br>'
  2943. //
  2944. //"config_10", "toList","nirjhar.bhattacharya@flipkart.com"
  2945. //"config_10", "ccList", "nirjhar.bhattacharya@flipkart.com"
  2946. //"config_10", "fromEmail", "nirjhar.bhattacharya@flipkart.com"
  2947. //"config_10", "ReplyToEmail", "nirjhar.bhattacharya@flipkart.com"
  2948. //"config_10", "mailSubject", Van Report : $(yesterday)
  2949. //"config_10", "textBody",'Hi, <br>PFA the van report for $(yesterday)</br>'
  2950. //
  2951. //"config_11", "toList", "nirjhar.bhattacharya@flipkart.com"
  2952. //"config_11", "ccList", "nirjhar.bhattacharya@flipkart.com"
  2953. //"config_11", "fromEmail", "nirjhar.bhattacharya@flipkart.com"
  2954. //"config_11", "ReplyToEmail", "nirjhar.bhattacharya@flipkart.com"
  2955. //"config_11", "mailSubject",FE Productivity/Attendance Report: $(yesterday)
  2956. //"config_11", "textBody",'Hi, <br>PFA the Productivity/Attendance Report $(yesterday)</br>'
  2957. //
  2958. //"config_12", "toList", "nirjhar.bhattacharya@flipkart.com"
  2959. //"config_12", "ccList", "nirjhar.bhattacharya@flipkart.com"
  2960. //"config_12", "fromEmail", "nirjhar.bhattacharya@flipkart.com"
  2961. //"config_12", "ReplyToEmail", "nirjhar.bhattacharya@flipkart.com"
  2962. //"config_12", "mailSubject",NDR Compliance Report: $(yesterday)
  2963. //"config_12", "textBody",'Hi, <br>PFA the NDR Compliance Report $(yesterday)</br>'
  2964. //
  2965. //
  2966. //"config_13", "toList", "nirjhar.bhattacharya@flipkart.com"
  2967. //"config_13", "ccList", "nirjhar.bhattacharya@flipkart.com"
  2968. //"config_13", "fromEmail", "nirjhar.bhattacharya@flipkart.com"
  2969. //"config_13", "ReplyToEmail", "nirjhar.bhattacharya@flipkart.com"
  2970. //"config_13", "mailSubject",Pending Reconciliation Report : $(yesterday)
  2971. //"config_13", "textBody",'Hi, <br>PFA the Pending Reconciliation Report $(yesterday)</br>'
  2972. //
  2973. //
  2974. //"config_14", "toList", "nirjhar.bhattacharya@flipkart.com"
  2975. //"config_14", "ccList", "nirjhar.bhattacharya@flipkart.com"
  2976. //"config_14", "fromEmail", "nirjhar.bhattacharya@flipkart.com"
  2977. //"config_14", "ReplyToEmail", "nirjhar.bhattacharya@flipkart.com"
  2978. //"config_14", "mailSubject",Devices Integrated Report $(yesterday)
  2979. //"config_14", "textBody",'Hi, <br>PFA the Devices Integrated Report for $(yesterday)</br>'
  2980. //
  2981. //];
  2982. //
  2983. //
  2984. ////"config_5", "toList", "nirjhar.bhattacharya@flipkart.com"
  2985. ////"config_5", "ccList", "nirjhar.bhattacharya@flipkart.com"
  2986. ////"config_5", "fromEmail", "nirjhar.bhattacharya@flipkart.com"
  2987. ////"config_5", "ReplyToEmail", "nirjhar.bhattacharya@flipkart.com"
  2988. ////"config_5", "mailSubject",Receive/OFD Timeline Report: $(yesterday)
  2989. ////"config_5", "textBody",'Hi, <br>PFA the Receive/OFD Timeline Report $(yesterday)</br>'
  2990. ////
  2991. //
  2992. ///*
  2993. //* For each Mail, different attachments it has
  2994. //* Each file represents one attachments
  2995. //* fileType : attachment/mailbody
  2996. //* fileAttachType: excel/image/html (excel only if filetype = attachment)
  2997. //* fileName : Temp file name for each fileId
  2998. //* fileId : Unique key for each row
  2999. //* mailConfigId : foreign key from MailEntity
  3000. //*/
  3001. ////AttachmentEntity:
  3002. ////LOAD * INLINE [
  3003. //// mailConfigId, fileId, fileName, fileType, fileAttachType
  3004. //// config_1, file1, $(excelAttachVan), attachment, excel
  3005. //// config_1, file2, table1.html, mailbody, html
  3006. //// config_1, file3, table2.html, mailbody, html
  3007. ////
  3008. //// config_2, file4, $(excelAttachSmart), attachment, excel
  3009. //// config_2, file5, table3.html, mailbody, html
  3010. ////
  3011. //// config_3, file6, $(excelAttachVol), attachment, excel
  3012. //// config_3, file7, table4.html, mailbody, html
  3013. ////
  3014. ////];
  3015. ////config_4, file16, $(excelAttachMShipmentRaw), attachment, excel
  3016. //
  3017. //AttachmentEntity:
  3018. //LOAD * INLINE [
  3019. // mailConfigId, fileId, fileName, fileType, fileAttachType
  3020. //
  3021. // config_1, file1, table1.html, mailbody, image
  3022. // config_1, file2, table2.html, mailbody, image
  3023. // config_1, file3, table3.html, mailbody, image
  3024. // config_1, file4, table3.html, mailbody, image
  3025. // config_1, file5, $(excelAttachVanCity), attachment, excel
  3026. // config_1, file6, $(excelAttachVanHub), attachment, excel
  3027. //
  3028. // config_2, file7, table1.html, mailbody, html
  3029. // config_2, file8, $(excelAttachSmartHub), attachment, excel
  3030. // config_2, file9, $(excelAttachSmartRaw), attachment, excel
  3031. //
  3032. // config_3, file10, table1.html, mailbody, html
  3033. // config_3, file30, table2.html, mailbody, html
  3034. // config_3, file11, $(excelAttachPOSHub), attachment, excel
  3035. // config_3, file12, $(excelAttachPOSRaw), attachment, excel
  3036. // config_3, file13, $(excelAttachPOSReconCity), attachment, excel
  3037. // config_3, file14, $(excelAttachPOSReconHub), attachment, excel
  3038. // config_3, file15, $(excelAttachPOSReconRaw), attachment, excel
  3039. // config_3, file31, $(excelAttachPOSPLHub), attachment, excel, mailbody, html
  3040. // config_3, file36, $(excelAttachPOSPLRaw), attachment, excel, mailbody, html
  3041. //
  3042. //
  3043. // config_5, file17, table1.html, mailbody, html
  3044. // config_5, file18, table2.html, mailbody, html
  3045. // config_5, file19, $(excelAttachRecOFDCity), attachment, excel
  3046. // config_5, file20, $(excelAttachRecOFDHub), attachment, excel
  3047. // config_5, file73, $(excelAttachRecHourly), attachment, excel
  3048. // config_5, file74, $(excelAttachOFDHourly), attachment, excel
  3049. // config_5, file75, $(excelAttachDelHourly), attachment, excel
  3050. // config_5, file76, $(excelAttachProdHourly), attachment, excel
  3051. // config_5, file77, $(excelAttachDeviceHourly), attachment, excel
  3052. //
  3053. // config_6, file21, table1.html, mailbody, html
  3054. // config_6, file22, table2.html, mailbody, html
  3055. // config_6, file23, $(excelAttachEKLDHCity), attachment, excel
  3056. // config_6, file24, table4.html, mailbody, html
  3057. //
  3058. // config_7, file25, table1.html, mailbody, html
  3059. // config_7, file26, table2.html, mailbody, html
  3060. // config_7, file27, table3.html, mailbody, html
  3061. // config_7, file28, $(excelAttachFEProdCity), attachment, excel
  3062. // config_7, file29, $(excelAttachFEProdHub), attachment, excel
  3063. //
  3064. // config_8, file32, table1.html, mailbody, html
  3065. // config_8, file33, $(excelAttachPOSTrackingRaw), attachment, excel
  3066. //
  3067. // config_9, file34, table1.html, mailbody, html
  3068. // config_9, file35, $(excelAttachIntDevicesHub), attachment, excel
  3069. //
  3070. // config_10, file37, table1.html, mailbody, html
  3071. // config_10, file38, table2.html, mailbody, html
  3072. // config_10, file39, table3.html, mailbody, html
  3073. // config_10, file40, table4.html, mailbody, html
  3074. // config_10, file41, $(excelAttachVanCityDelivery), attachment, excel
  3075. // config_10, file42, $(excelAttachVanHubDelivery), attachment, excel
  3076. // config_10, file43, $(excelAttachVanRawDelivery), attachment, excel
  3077. // config_10, file44, $(excelAttachVanCityMP), attachment, excel
  3078. // config_10, file45, $(excelAttachVanHubMP), attachment, excel
  3079. // config_10, file46, $(excelAttachVanRawMP), attachment, excel
  3080. //
  3081. // config_11, file47, table1.html, mailbody, html
  3082. // config_11, file48, table2.html, mailbody, html
  3083. // config_11, file49, table3.html, mailbody, html
  3084. // config_11, file50, table4.html, mailbody, html
  3085. // config_11, file51, $(excelAttachFEProdCityDelivery), attachment, excel
  3086. // config_11, file52, $(excelAttachFEProdHubDelivery), attachment, excel
  3087. // config_11, file53, $(excelAttachFEProdCityMP), attachment, excel
  3088. // config_11, file54, $(excelAttachFEProdHubMP), attachment, excel
  3089. // config_11, file72, $(excelAttachFEProdRaw), attachment, excel
  3090. //
  3091. // config_12, file55, table1.html, mailbody, html
  3092. // config_12, file56, table2.html, mailbody, html
  3093. //
  3094. // config_13, file57, table1.html, mailbody, html
  3095. // config_13, file58, table2.html, mailbody, html
  3096. // config_13, file71, $(excelAttachPendingRecoRaw), attachment, excel
  3097. //
  3098. // config_14, file69, table1.html, mailbody, html
  3099. // config_14, file70, table2.html, mailbody, html
  3100. // config_14, file59, table3.html, mailbody, html
  3101. // config_14, file60, table4.html, mailbody, html
  3102. // config_14, file61, table5.html, mailbody, html
  3103. // config_14, file62, table6.html, mailbody, html
  3104. //
  3105. //
  3106. // config_14, file63, $(excelAttachIntDevicesCityDetail), attachment, excel
  3107. // config_14, file64, $(excelAttachIntDevicesHubDetail), attachment, excel
  3108. // config_14, file65, $(excelAttachIntDevicesFEDetail), attachment, excel
  3109. // config_14, file66, $(excelAttachPOSHub), attachment, excel
  3110. // config_14, file67, $(excelAttachPOSPLHub), attachment, excel
  3111. // config_14, file68, $(excelAttachSmartHub), attachment, excel
  3112. // ];
  3113. //
  3114. //
  3115. //
  3116. //
  3117. //// config_5, file16, table1.html, mailbody, html
  3118. //// config_5, file17, table2.html, mailbody, html
  3119. //// config_5, file18, $(excelAttachRecOFDCity), attachment, excel
  3120. //// config_5, file19, $(excelAttachRecOFDHub), attachment, excel
  3121. ///*
  3122. //config_3, file15, table1.html, mailbody, html
  3123. // config_3, file16, $(excelAttachPOSReconHub), attachment, excel
  3124. //* For each File, stores different Objects it can have
  3125. //* Each Object represents one object from front end
  3126. //* if File corresponds to 'excel' filetype, it requires objTabName, objToSelect ,objComments,objCellPos,objType info
  3127. //* objTabName = Name of tab in Excel sheet
  3128. //* objToSelect = Front end obj to copy/export
  3129. //* objComments = Any comments associated with the table copied to excel, put "" (empty) if no comments
  3130. //* objCellPos = Cell no in excel from where you want to copy into excel sheet. Eg: A1,A4(if any comments)
  3131. //* objType = Type of object, Data/image/html. Eg: Tables: Data, Charts/graphs: image
  3132. //* objId = Unique id for each row
  3133. //* fileId = foreign key from AttachmentEntity
  3134. //*/
  3135. ////ObjectEntity:
  3136. ////Load * Inline
  3137. ////[ fileId,objId,objTabName, objToSelect ,objComments,objCellPos,objType
  3138. ////
  3139. //// "file1","obj1","$(excelAttachVan)", "CH37", "","A2","Data"
  3140. //// "file2","obj2","Van Report Zone", "CH35", "","A2","Data"
  3141. //// "file3","obj3","Van Report City", "CH36", "","A2","Data"
  3142. ////
  3143. ////
  3144. //// "file4","obj4","$(excelAttachSmart)", "CH21", "","A2","Data"
  3145. //// "file5","obj5","Smart Devices Report Hub", "CH23", "","A2","Data"
  3146. ////
  3147. ////
  3148. //// "file6","obj6","$(excelAttachSmart)", "CH21", "","A2","Data"
  3149. //// "file7","obj7","Volumetric Report Hub", "CH22", "","A2","Data"
  3150. ////
  3151. ////];
  3152. //
  3153. ////"file16","obj16","Shipment Raw Data", "TB44", "","A2","Data"
  3154. //
  3155. //ObjectEntity:
  3156. //Load * Inline
  3157. //[ fileId,objId,objTabName, objToSelect ,objComments,objCellPos,objType
  3158. //
  3159. //
  3160. // "file1","obj1","Received Hourly", "CH340", "","","image"
  3161. // "file2","obj2","OFD Hourly", "CH341", "","","image"
  3162. // "file3","obj3","Delivered Hourly", "CH339", "","","image"
  3163. // "file4","obj4","Devices Delivered Hourly", "CH338", "","","image"
  3164. // "file5","obj5","Van Report City All", "CH147", "","A2","Data"
  3165. // "file6","obj6","Van Report Hub All", "CH191", "","A2","Data"
  3166. //
  3167. // "file7","obj7","Smart Report City", "CH211", "","","html"
  3168. // "file8","obj8","Smart Report Hub ", "CH212", "","A2","Data"
  3169. // "file9","obj9","Smart Report Raw Data", "CH113", "","A2","Data"
  3170. //
  3171. // "file10","obj10","POS Devices Report City", "CH162", "","","html"
  3172. // "file11","obj11","POS Devices Report Hub ", "CH160", "","A2","Data"
  3173. // "file12","obj12","POS Devices Report Raw Data", "CH159", "","A2","Data"
  3174. //
  3175. // "file13","obj13","POS Recon Report City", "CH163","","A2","Data"
  3176. // "file14","obj14","POS Recon Report Hub", "CH164", "","A2","Data"
  3177. // "file15","obj15","POS Recon Raw Data", "TB34", "","A2","Data"
  3178. // "file30","obj30","Pinelabs Devices Report City", "CH210", "","","html"
  3179. // "file31","obj31","Pinelabs Devices Report Hub", "CH209", "","A2","Data"
  3180. // "file36","obj36","Pinelabs Devices Report Raw", "CH238", "","A2","Data"
  3181. //
  3182. //
  3183. //
  3184. // "file17","obj17","Receive OFD Zone", "CH175", "","","html"
  3185. // "file18","obj18","Receive OFD State", "CH176", "","","html"
  3186. // "file19","obj19","Receive OFD City", "CH177", "","A2","Data"
  3187. // "file20","obj20","Receive OFD Hub", "CH178", "","A2","Data"
  3188. //
  3189. // "file73","obj73","Receive Hourly", "CH306", "","A2","Data"
  3190. // "file74","obj74","OFD Hourly", "CH307", "","A2","Data"
  3191. // "file75","obj75","Delivered Hourly", "CH311", "","A2","Data"
  3192. // "file76","obj76","Productivity Hourly", "CH304", "","A2","Data"
  3193. // "file77","obj77","Devices Hourly", "CH309", "","A2","Data"
  3194. //
  3195. //
  3196. // "file21","obj21","EKL DH Zone", "CH188", "","","html"
  3197. // "file22","obj22","EKL DH State", "CH189", "","","html"
  3198. // "file23","obj23","EKL DH City", "CH187", "","A2","Data"
  3199. // "file24","obj24","EKL DH Hub", "CH186", "","","html"
  3200. //
  3201. // "file25","obj25","FE Prod Zone", "CH205", "","","html"
  3202. // "file26","obj26","FE Prod City", "CH204", "","","html"
  3203. // "file27","obj27","FE Prod Hub", "CH200", "","","html"
  3204. // "file28","obj28","FE Prod City", "CH204", "","A2","Data"
  3205. // "file29","obj29","FE Prod Hub", "CH200", "","A2","Data"
  3206. //
  3207. // "file32","obj32","POS ERP-MIS Mismatch Hub", "CH213", "","","html"
  3208. // "file33","obj33","POS ERP-MIS Mismatch Hub Raw", "TB46", "","A2","Data"
  3209. //
  3210. // "file34","obj34","Integrated Devices Report City ", "CH253", "","","html"
  3211. // "file35","obj35","Integrated Devices Report Hub", "CH226", "","A2","Data"
  3212. //
  3213. // "file37","obj37","Van Report Zone Deliveries", "CH248", "","","html"
  3214. // "file38","obj38","Van Report Top City Deliveries", "CH230", "","","html"
  3215. // "file39","obj39","Van Report Zone MP", "CH231", "","","html"
  3216. // "file40","obj40","Van Report Top City MP", "CH234", "","","html"
  3217. // "file41","obj41","Van Report City Deliveries", "CH230", "","A2","Data"
  3218. // "file42","obj42","Van Report Hub Deliveries", "CH249", "","A2","Data"
  3219. // "file43","obj43","Van Report Raw Deliveries", "CH225", "","A2","Data"
  3220. // "file44","obj44","Van Report City MP", "CH234", "","A2","Data"
  3221. // "file45","obj45","Van Report Hub MP", "CH235", "","A2","Data"
  3222. // "file46","obj46","Van Report Raw MP", "CH245", "","A2","Data"
  3223. //
  3224. // "file47","obj47","FE Prod Zone Deliveries", "CH237", "","","html"
  3225. // "file48","obj48","FE Prod Top City Deliveries", "CH240", "","","html"
  3226. // "file49","obj49","FE Prod Zone MP", "CH250", "","","html"
  3227. // "file50","obj50","FE Prod Top City MP", "CH242","","","html"
  3228. // "file51","obj51","FE Prod City Deliveries", "CH240", "","A2","Data"
  3229. // "file52","obj52","FE Prod Hub Deliveries", "CH241", "","A2","Data"
  3230. // "file53","obj53","FE Prod City MP ", "CH226", "","A2","Data"
  3231. // "file54","obj54","FE Prod Hub MP", "CH243", "","A2","Data"
  3232. // "file72","obj72","FE Prod Raw Data", "CH323", "","A2","Data"
  3233. //
  3234. // "file55","obj55","NDR City", "CH260", "","A2","Data"
  3235. // "file56","obj56","NRD Hub", "CH259", "","A2","Data"
  3236. //
  3237. // "file57","obj57","Pending Reconciliation Report City", "CH322", "","","html"
  3238. // "file58","obj58","Pending Reconciliation Report Hub", "CH321", "","","html"
  3239. // "file72","obj78","Cash Reconciliation Report Hub", "CH300", "","","html"
  3240. // "file73","obj79","Cash Reconciliation Report Hub", "CH313", "","","html"
  3241. // "file71","obj71","Pending Report Raw Data", "TB60", "","A2","Data"
  3242. // "file74","obj80","Cash Recon Report Raw Data", "TB62", "","A2","Data"
  3243. //
  3244. // "file59","obj59","Integrated Device Report City(Summary)", "CH279", "","","html"
  3245. // "file60","obj60","POS Report City(Summary)", "CH277", "","","html"
  3246. // "file61","obj61","Pinelab Report City(Summary)", "CH278", "","","html"
  3247. // "file62","obj62","Smart Devices Report city(Summary)", "CH283", "","","html"
  3248. //
  3249. // "file69","obj69","Integrated Device Report Zone", "CH324", "","A2","Data"
  3250. // "file70","obj70","Integrated Device Report Region", "CH325", "","A2","Data"
  3251. // "file63","obj63","Integrated Device Report City", "CH289", "","A2","Data"
  3252. // "file64","obj64","Integrated Device Report Hub", "CH290", "","A2","Data"
  3253. // "file65","obj65","Integrated Device Report FE", "CH291", "","A2","Data"
  3254. // "file66","obj66","POS Hub", "CH292", "","A2","Data"
  3255. // "file67","obj67","Pinelabs Hub", "CH293", "","A2","Data"
  3256. // "file68","obj68","Smart Devices Hub", "CH295", "","A2","Data"
  3257. // ];
  3258. //
  3259. //// "file16","obj16","Receive/OFD Zone", "CH167", "","","html"
  3260. //// "file17","obj17","Receive/OFD State", "CH174", "","","html"
  3261. //// "file18","obj18","Receive/OFD City", "CH168", "","A2","Data"
  3262. //// "file19","obj19","Receive/OFD Hub", "CH158", "","A2","Data"
  3263. //
  3264. //
  3265. ///*
  3266. // "file15","obj15","POS Devices Reconciliation Report City", "CH119", "","","html"
  3267. // "file16","obj16","POS Devices Reconciliation Report Hub", "CH116", "","A2","Data"
  3268. //* For each Object to copy, stores different selections it requires before mailing
  3269. //* Each Object will represents one selectionBoxId from front end
  3270. //* This SelectionBox will be created and stored on front-end using snapshot button
  3271. //* You can have same selection for different objects
  3272. //* objId : primary key and foreign key
  3273. //*/
  3274. ////SelectionEnity:
  3275. ////Load * Inline
  3276. ////[ objId, selectionBoxId
  3277. //// "obj1","selectionBox1"
  3278. //// "obj2","selectionBox2"
  3279. //// "obj3","selectionBox3"
  3280. //// "obj4","selectionBox4"
  3281. //// "obj5","selectionBox5"
  3282. //// "obj6","selectionBox6"
  3283. //// "obj7","selectionBox7"
  3284. //// ];
  3285. //// "obj16","selectionBox15"
  3286. //SelectionEnity:
  3287. //Load * Inline
  3288. //[ objId, selectionBoxId
  3289. // "obj1","selectionBox1"
  3290. // "obj2","selectionBox2"
  3291. // "obj3","selectionBox3"
  3292. // "obj4","selectionBox4"
  3293. // "obj5","selectionBox5"
  3294. // "obj6","selectionBox6"
  3295. // "obj7","selectionBox7"
  3296. // "obj8","selectionBox8"
  3297. //
  3298. // "obj9","selectionBox9"
  3299. // "obj10","selectionBox10"
  3300. // "obj11","selectionBox11"
  3301. //
  3302. // "obj12","selectionBox12"
  3303. // "obj13","selectionBox13"
  3304. //
  3305. // "obj14","selectionBox14"
  3306. // "obj15","selectionBox20"
  3307. //
  3308. //
  3309. //
  3310. // "obj17","selectionBox16"
  3311. // "obj18","selectionBox17"
  3312. // "obj19","selectionBox18"
  3313. // "obj20","selectionBox19"
  3314. //
  3315. // "obj73","selectionBox73"
  3316. // "obj74","selectionBox74"
  3317. // "obj75","selectionBox75"
  3318. // "obj76","selectionBox76"
  3319. // "obj77","selectionBox77"
  3320. //
  3321. // "obj21","selectionBox21"
  3322. // "obj22","selectionBox22"
  3323. // "obj23","selectionBox23"
  3324. // "obj24","selectionBox24"
  3325. //
  3326. // "obj25","selectionBox25"
  3327. // "obj26","selectionBox26"
  3328. // "obj27","selectionBox27"
  3329. //
  3330. // "obj28","selectionBox28"
  3331. // "obj29","selectionBox29"
  3332. // "obj30","selectionBox30"
  3333. // "obj31","selectionBox31"
  3334. //
  3335. // "obj32","selectionBox32"
  3336. // "obj33","selectionBox33"
  3337. //
  3338. // "obj34","selectionBox34"
  3339. // "obj35","selectionBox35"
  3340. //
  3341. // "obj36","selectionBox36"
  3342. // "obj37","selectionBox37"
  3343. // "obj38","selectionBox38"
  3344. // "obj39","selectionBox39"
  3345. // "obj40","selectionBox40"
  3346. // "obj41","selectionBox41"
  3347. // "obj42","selectionBox42"
  3348. // "obj43","selectionBox43"
  3349. // "obj44","selectionBox44"
  3350. // "obj45","selectionBox45"
  3351. // "obj46","selectionBox46"
  3352. // "obj47","selectionBox47"
  3353. // "obj48","selectionBox48"
  3354. // "obj49","selectionBox49"
  3355. // "obj50","selectionBox50"
  3356. // "obj51","selectionBox51"
  3357. // "obj52","selectionBox52"
  3358. // "obj53","selectionBox53"
  3359. // "obj54","selectionBox54"
  3360. // "obj72","selectionBox72"
  3361. //
  3362. // "obj55","selectionBox55"
  3363. // "obj56","selectionBox56"
  3364. //
  3365. // "obj57","selectionBox57"
  3366. // "obj58","selectionBox58"
  3367. // "obj71","selectionBox71"
  3368. // "obj78","selectionBox78"
  3369. // "obj79","selectionBox79"
  3370. // "obj80","selectionBox80"
  3371. //
  3372. // "obj69","selectionBox69"
  3373. // "obj70","selectionBox70"
  3374. // "obj59","selectionBox59"
  3375. // "obj60","selectionBox60"
  3376. // "obj61","selectionBox61"
  3377. // "obj62","selectionBox62"
  3378. // "obj63","selectionBox63"
  3379. // "obj64","selectionBox64"
  3380. // "obj65","selectionBox65"
  3381. // "obj66","selectionBox66"
  3382. // "obj67","selectionBox67"
  3383. // "obj68","selectionBox68"
  3384. //
  3385. // ];
  3386. //
  3387. //// "obj16","selectionBox16"
  3388. //// "obj17","selectionBox17"
  3389. //// "obj18","selectionBox17"
  3390. //// "obj19","selectionBox17"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement