diff --git a/README.md b/README.md index a18d90b..e89133f 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,20 @@ -# Domino's SV interface +# Domino's CR interface This interface will sync sales to HIVE according to given paramenters ```sh # sync sales for specific branch for today -python3 dosv.py --branch=14759 +python3 docr.py --branch=14759 # sync sales for specific branch and date -python3 dosv.py --branch=14759 --start-date=20230701 +python3 docr.py --branch=14759 --start-date=20230701 # sync (specific) sales for specific branch and date # all is the default behaviour this command is exactly similar to the one above -python3 dosv.py --branch=14759 --start-date=20230701 --orders=all +python3 docr.py --branch=14759 --start-date=20230701 --orders=all # specifying sales -python3 dosv.py --branch=14759 --start-date=20230701 --orders=54678,673342 +python3 docr.py --branch=14759 --start-date=20230701 --orders=54678,673342 # ALL THE COMMANDS ABOVE WILL SEARCH THE ORDERS (ALL OR SPECIFIC) IN # POS.DBO.ORDERS TABLE AND WILL ATTEMPT TO INSERT THEM IN HIVE_SALES @@ -24,12 +24,12 @@ python3 dosv.py --branch=14759 --start-date=20230701 --orders=54678,673342 # IN HIVE SALES # reprocess all branches for today -python3 dosv.py --reprocess=true +python3 docr.py --reprocess=true # reprocess specific branch for given date -python3 dosv.py --branch=14759 --start-date=20230701 --reprocess=true +python3 docr.py --branch=14759 --start-date=20230701 --reprocess=true # reprocess specific branch for given date and orders -python3 dosv.py --branch=14759 --start-date=20230701 --orders=54678,673342 --reprocess=true +python3 docr.py --branch=14759 --start-date=20230701 --orders=54678,673342 --reprocess=true ``` \ No newline at end of file diff --git a/models/docr/sale.py b/models/docr/sale.py index 465db33..96e61e9 100644 --- a/models/docr/sale.py +++ b/models/docr/sale.py @@ -31,16 +31,7 @@ class SaleModel(model.Model): self.discounts_amt = fields.ThisModelDecimalValue( db_column='OrderLineDiscountAmt', decimal_places=4 ) - self.official_doc = fields.One2OneValue( - db_column='ReceiptNumber', - db_table='GovernmentReceipt.dbo.ReceiptHistory', - join=( - ('Order_Number', 'OrderNumber'), - ('Order_Date', 'OrderDate'), - ('Location_Code', 'LocationCode') - ), - raise_not_found_error=False - ) + self.official_doc = fields.FixedValue(value='docr-dummy') self.delivery_channel = fields.One2OneValue( db_column='Description', db_table='pos.dbo.ServiceMethods',