Subversion Repositories SmartDukaan

Rev

Rev 21838 | Rev 21862 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 21838 Rev 21853
Line 12... Line 12...
12
from shop2020.config.client.ConfigClient import ConfigClient
12
from shop2020.config.client.ConfigClient import ConfigClient
13
from shop2020.model.v1.catalog.impl import DataService
13
from shop2020.model.v1.catalog.impl import DataService
14
from shop2020.model.v1.catalog.impl.CategoryManager import CategoryManager
14
from shop2020.model.v1.catalog.impl.CategoryManager import CategoryManager
15
from shop2020.model.v1.catalog.impl.Convertors import to_t_item, to_t_source, \
15
from shop2020.model.v1.catalog.impl.Convertors import to_t_item, to_t_source, \
16
    to_t_brand_info, to_t_private_deal, to_t_exclusive_affiliate_item_info, \
16
    to_t_brand_info, to_t_private_deal, to_t_exclusive_affiliate_item_info, \
17
    to_t_bulk_pricing
17
    to_t_bulk_pricing, to_t_categoryHsnCode
18
from shop2020.model.v1.catalog.impl.DataService import Item, ItemChangeLog, \
18
from shop2020.model.v1.catalog.impl.DataService import Item, ItemChangeLog, \
19
    Category, EntityIDGenerator, SimilarItems, ProductNotification, Source, \
19
    Category, EntityIDGenerator, SimilarItems, ProductNotification, Source, \
20
    SourceItemPricing, AuthorizationLog, VoucherItemMapping, CategoryVatMaster, \
20
    SourceItemPricing, AuthorizationLog, VoucherItemMapping, CategoryVatMaster, \
21
    OOSTracker, EntityTag, ItemInsurerMapping, Insurer, Banner, BannerMap, \
21
    OOSTracker, EntityTag, ItemInsurerMapping, Insurer, Banner, BannerMap, \
22
    FreebieItem, BrandInfo, Amazonlisted, StorePricing, ItemVatMaster, \
22
    FreebieItem, BrandInfo, Amazonlisted, StorePricing, ItemVatMaster, \
Line 3463... Line 3463...
3463
    
3463
    
3464
    return centralGstMap
3464
    return centralGstMap
3465
             
3465
             
3466
              
3466
              
3467
def get_hsn_codes_by_category(categoryId):
3467
def get_hsn_codes_by_category(categoryId):
3468
    return [hsnCode for (hsnCode,) in session.query(CategoryHsnCodes.hsnCode).filter(CategoryHsnCodes.categoryId==categoryId).all()]
3468
    return [to_t_categoryHsnCode(categoryHsnCode) for categoryHsnCode in session.query(CategoryHsnCodes).filter(CategoryHsnCodes.categoryId==categoryId).all()]
3469
 
3469
 
3470
def get_warranty_info_for_item(itemId, itemCondition):
3470
def get_warranty_info_for_item(itemId, itemCondition):
3471
    itemWarrantyInfo = ItemWarrantyInfo.query.filter(and_(ItemWarrantyInfo.catalogItemId ==itemId, ItemWarrantyInfo.itemCondition==itemCondition)).first()
3471
    itemWarrantyInfo = ItemWarrantyInfo.query.filter(and_(ItemWarrantyInfo.catalogItemId ==itemId, ItemWarrantyInfo.itemCondition==itemCondition)).first()
3472
    itemwarrantyinfoMap = {}
3472
    itemwarrantyinfoMap = {}
3473
    if itemWarrantyInfo is None:
3473
    if itemWarrantyInfo is None: