some new changes in excel & ranching adashboard fromdevelopent

This commit is contained in:
2025-12-14 14:24:10 +03:30
3 changed files with 92 additions and 5 deletions

View File

@@ -6,10 +6,10 @@ from openpyxl.styles import Font
from rest_framework import viewsets
from rest_framework.decorators import action
from apps.authentication.services.visibility_services import apply_visibility_filter
from apps.core.mixins.search_mixin import ExcelDynamicSearchMixin
from apps.warehouse import models as warehouse_models
from apps.warehouse.web.api.v1 import serializers as warehouse_serializers
from apps.authentication.services.visibility_services import apply_visibility_filter
from common.helper_excel import create_header, excel_description, create_header_freez, create_value, shamsi_date, \
convert_str_to_date
from common.helpers import get_organization_by_user
@@ -309,7 +309,7 @@ class WareHouseExcelViewSet(viewsets.ModelViewSet, ExcelDynamicSearchMixin):
rancher_data = data.get('rancher')
national_code = rancher_data.get('national_code', '-') if rancher_data else '-'
rancher_name = rancher_data.get('fullname', '-') if rancher_data else '-'
rancher_name = data.get('rancher_fullname', '-') if rancher_data else '-'
seller_org = data.get('seller_organization')
org_name = seller_org.get('name', '-') if seller_org else '-'