@@ -256,6 +256,8 @@ def single_project_export(request, pk, format):
256
256
{"header" : "Unit Type" , "type" : "string" , "width" : 20 },
257
257
{"header" : "Units" , "type" : "string" , "width" : 20 },
258
258
{"header" : "No_of_Transfer" , "type" : "string" , "width" : 20 },
259
+ {"header" : "Ration Size" , "type" : "string" , "width" : 20 },
260
+ {"header" : "Ration Type" , "type" : "string" , "width" : 20 },
259
261
{"header" : "Grant Type" , "type" : "string" , "width" : 20 },
260
262
{"header" : "Transfer Category" , "type" : "string" , "width" : 20 },
261
263
{"header" : "Currency" , "type" : "string" , "width" : 20 },
@@ -319,6 +321,7 @@ def single_project_export(request, pk, format):
319
321
plans = project .activityplan_set .all ()
320
322
for plan in plans :
321
323
locations = plan .targetlocation_set .all ()
324
+ cash_details = plan .cashinkinddetail_set .all ().first ()
322
325
for location in locations :
323
326
# Create a dictionary to hold disaggregation data
324
327
disaggregation_data = {}
@@ -365,15 +368,21 @@ def single_project_export(request, pk, format):
365
368
plan .beneficiary .name if plan .beneficiary else None ,
366
369
plan .hrp_beneficiary .name if plan .hrp_beneficiary else None ,
367
370
plan .description if plan .description else None ,
368
- plan .package_type .name if plan .package_type else None ,
369
- plan .unit_type .name if plan .unit_type else None ,
370
- plan .units if plan .units else None ,
371
- plan .no_of_transfers if plan .no_of_transfers else None ,
372
- plan .grant_type .name if plan .grant_type else None ,
373
- plan .transfer_category .name if plan .transfer_category else None ,
374
- plan .currency .name if plan .currency else None ,
375
- plan .transfer_mechanism_type .name if plan .transfer_mechanism_type else None ,
376
- plan .implement_modility_type .name if plan .implement_modility_type else None ,
371
+ cash_details .package_type .name if cash_details and cash_details .package_type else None ,
372
+ cash_details .unit_type .name if cash_details and cash_details .unit_type else None ,
373
+ cash_details .units if cash_details and cash_details .units else None ,
374
+ cash_details .no_of_transfers if cash_details and cash_details .no_of_transfers else None ,
375
+ cash_details .ration_size .name if cash_details and cash_details .ration_size else None ,
376
+ cash_details .ration_type .name if cash_details and cash_details .ration_type else None ,
377
+ cash_details .grant_type .name if cash_details and cash_details .grant_type else None ,
378
+ cash_details .transfer_category .name if cash_details and cash_details .transfer_category else None ,
379
+ cash_details .currency .name if cash_details and cash_details .currency else None ,
380
+ cash_details .transfer_mechanism_type .name
381
+ if cash_details and cash_details .transfer_mechanism_type
382
+ else None ,
383
+ cash_details .implement_modality_type .name
384
+ if cash_details and cash_details .implement_modality_type
385
+ else None ,
377
386
location .country .code if location .province else None ,
378
387
location .country .name if location .province else None ,
379
388
location .province .code if location .province else None ,
0 commit comments