fix bug
Showing
1 changed file
with
12 additions
and
8 deletions
... | @@ -656,20 +656,24 @@ class BSWorkbook(Workbook): | ... | @@ -656,20 +656,24 @@ class BSWorkbook(Workbook): |
656 | count_list.append((field_str, count)) | 656 | count_list.append((field_str, count)) |
657 | 657 | ||
658 | def simple_license_rebuild(self, license_summary, document_scheme): | 658 | def simple_license_rebuild(self, license_summary, document_scheme): |
659 | for ic_license_dict in license_summary.get(consts.IC_CLASSIFY, []): | ||
660 | if ic_license_dict.get('类别') == '1': | ||
661 | license_summary.setdefault(consts.RP_CLASSIFY, []).append(ic_license_dict) | ||
662 | continue | ||
663 | |||
664 | for vat_license_dict in license_summary.get(consts.VAT_CLASSIFY, []): | ||
665 | if vat_license_dict.get('发票类型') == 'special': | ||
666 | license_summary.setdefault(consts.VATS_CLASSIFY, []).append(vat_license_dict) | ||
667 | continue | ||
668 | |||
659 | for classify, (_, name, field_order, side_diff, scheme_diff, _) in consts.FOLDER_LICENSE_ORDER: | 669 | for classify, (_, name, field_order, side_diff, scheme_diff, _) in consts.FOLDER_LICENSE_ORDER: |
660 | license_list = license_summary.get(classify) | 670 | license_list = license_summary.get(classify) |
661 | if not license_list: | 671 | if not license_list: |
662 | continue | 672 | continue |
663 | ws = self.create_sheet(name) | 673 | ws = self.create_sheet(name) |
664 | if scheme_diff and document_scheme == consts.DOC_SCHEME_LIST[1]: | 674 | # if scheme_diff and document_scheme == consts.DOC_SCHEME_LIST[1]: |
665 | classify = consts.MVC_CLASSIFY_SE | 675 | # classify = consts.MVC_CLASSIFY_SE |
666 | for license_dict in license_list: | 676 | for license_dict in license_list: |
667 | if classify == consts.IC_CLASSIFY and license_dict.get('类别') == '1': | ||
668 | license_summary.setdefault(consts.RP_CLASSIFY, []).append(license_dict) | ||
669 | continue | ||
670 | if classify == consts.VAT_CLASSIFY and license_dict.get('发票类型') == 'special': | ||
671 | license_summary.setdefault(consts.VATS_CLASSIFY, []).append(license_dict) | ||
672 | continue | ||
673 | if side_diff: | 677 | if side_diff: |
674 | key, field_order_yes, field_order_no = consts.FIELD_ORDER_MAP.get(classify) | 678 | key, field_order_yes, field_order_no = consts.FIELD_ORDER_MAP.get(classify) |
675 | field_order = field_order_yes if key in license_dict else field_order_no | 679 | field_order = field_order_yes if key in license_dict else field_order_no | ... | ... |
-
Please register or sign in to post a comment