-- fixed value was added to official_doc

This commit is contained in:
Marvin Vallecillo 2024-12-23 22:27:50 -06:00
parent a2663d15be
commit 7c3a8cacb6
2 changed files with 9 additions and 18 deletions

View File

@ -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
```

View File

@ -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',