Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
19413 amit.gupta 1
'''
2
Created on Mar 10, 2016
3
 
4
@author: amit
5
'''
6
from elixir import *
7
from functools import partial
8
from shop2020.clients.CatalogClient import CatalogClient
9
from shop2020.clients.TransactionClient import TransactionClient
10
from shop2020.model.v1.inventory.impl import DataService
11
from shop2020.model.v1.inventory.impl.Convertors import to_t_warehouse, \
12
    to_t_itemidwarehouseid, to_t_state
13
from shop2020.model.v1.inventory.impl.DataService import Warehouse, \
14
    ItemInventoryHistory, CurrentInventorySnapshot, VendorItemPricing, \
15
    VendorItemMapping, Vendor, MissedInventoryUpdate, BadInventorySnapshot, \
16
    VendorHolidays, ItemAvailabilityCache, \
17
    CurrentReservationSnapshot, IgnoredInventoryUpdateItems, ItemStockPurchaseParams, \
18
    OOSStatus, AmazonInventorySnapshot, StateMaster, HoldInventoryDetail, AmazonFbaInventorySnapshot, \
19
    SnapdealInventorySnapshot, FlipkartInventorySnapshot, SnapdealStockAtEOD, FlipkartStockAtEOD, StockWeightedNlcInfo
20
from shop2020.thriftpy.model.v1.inventory.ttypes import \
21
    InventoryServiceException, HolidayType, InventoryType, WarehouseType
22
from shop2020.thriftpy.model.v1.order.ttypes import AlertType
23
from shop2020.thriftpy.purchase.ttypes import PurchaseServiceException
24
from shop2020.utils import EmailAttachmentSender
25
from shop2020.utils.EmailAttachmentSender import mail
26
from shop2020.utils.Utils import to_py_date, to_java_date
27
from sqlalchemy.orm.exc import MultipleResultsFound, NoResultFound
28
from sqlalchemy.sql import or_
29
from sqlalchemy.sql.expression import and_, func, distinct, desc
30
from sqlalchemy.sql.functions import count
31
import calendar
32
import datetime
33
import sys
34
import threading
35
import math