update code of dash and report of cont_client and devlp abstract of qty
This commit is contained in:
@@ -2,27 +2,27 @@ from flask import Blueprint, render_template, request, send_file, flash
|
||||
from collections import defaultdict
|
||||
import pandas as pd
|
||||
import io
|
||||
from app.utils.helpers import login_required
|
||||
from app.utils.regex_utils import RegularExpression
|
||||
|
||||
# Contractor models import
|
||||
from app.models.subcontractor_model import Subcontractor
|
||||
from app.models.trench_excavation_model import TrenchExcavation
|
||||
from app.models.manhole_excavation_model import ManholeExcavation
|
||||
from app.models.manhole_domestic_chamber_model import ManholeDomesticChamber
|
||||
from app.models.laying_model import Laying
|
||||
|
||||
# Client models import
|
||||
from app.models.tr_ex_client_model import TrenchExcavationClient
|
||||
from app.models.mh_ex_client_model import ManholeExcavationClient
|
||||
from app.models.mh_dc_client_model import ManholeDomesticChamberClient
|
||||
from app.models.laying_client_model import LayingClient
|
||||
|
||||
from app.utils.helpers import login_required
|
||||
from app.utils.regex_utils import RegularExpression
|
||||
|
||||
|
||||
|
||||
|
||||
generate_report_bp = Blueprint("generate_report", __name__, url_prefix="/report")
|
||||
|
||||
|
||||
|
||||
|
||||
# NORMALIZER
|
||||
def normalize_key(value):
|
||||
if value is None:
|
||||
@@ -241,7 +241,7 @@ def comparison_report():
|
||||
write_sheet(writer, df_dc, "MH & DC", subcontractor.subcontractor_name)
|
||||
write_sheet(writer, df_lay, "Laying", subcontractor.subcontractor_name)
|
||||
|
||||
output.seek(0)
|
||||
output.seek(0)
|
||||
return send_file(
|
||||
output,
|
||||
as_attachment=True,
|
||||
|
||||
Reference in New Issue
Block a user