Commit graph

245 commits

Author SHA1 Message Date
Lance Edgar cb58a26cb1 Update changelog 2023-02-12 10:12:11 -06:00
Lance Edgar 82892be096 More refactoring, Query.get() => Session.get() 2023-02-12 09:37:31 -06:00
Lance Edgar 0b5930a511 Refactor Query.get() => Session.get() per SQLAlchemy 1.4 2023-02-11 22:06:43 -06:00
Lance Edgar 6696973868 Update changelog 2023-01-03 18:12:03 -06:00
Lance Edgar 4d49d4235b Define default handler for corepos_member batch type 2023-01-03 18:11:24 -06:00
Lance Edgar c8f55bf472 Update changelog 2023-01-02 16:58:06 -06:00
Lance Edgar 63a1172408 Update usage of short_session() per upstream changes 2022-08-21 20:00:15 -05:00
Lance Edgar 7eb7c25172 Fix datasync bug for CORE API -> Rattail 2022-08-21 11:33:51 -05:00
Lance Edgar 82ad5ad441 Configure DB connections for CORE trans archive on app startup 2022-03-26 23:04:40 -05:00
Lance Edgar 57ea39acb5 Update changelog 2022-03-15 11:36:01 -05:00
Lance Edgar 8daec28faf Add "raw" card number value to CORE Member Import batch
b/c source file may not have it, or may not be numeric
2022-03-15 11:34:37 -05:00
Lance Edgar 90cb4cf028 Update changelog 2022-03-02 21:37:33 -06:00
Lance Edgar 82f73276ba Refactor some importer method calls to avoid deprecation warnings 2022-01-08 19:51:47 -06:00
Lance Edgar 1f3ab43e91 Avoid error if CORE product data is missing some fields 2022-01-08 19:51:31 -06:00
Lance Edgar e91fef0e8d Refactor CORE API hack to use custdata instead of Customers table
the older table seems more reliable?  at least i just ran across an
example where it was, albeit a demo..
2022-01-08 19:49:51 -06:00
Lance Edgar 802ffddc6d Update import per pycorepos changes 2021-12-30 21:49:00 -06:00
Lance Edgar 74b9ec5e1e Avoid deprecated base class, per upstream changes 2021-12-30 15:53:59 -06:00
Lance Edgar 9045965035 Mark some import handlers as safe for web app 2021-12-06 21:29:56 -06:00
Lance Edgar 3140245857 OMG a ridiculous commit to overhaul import handler config etc.
- register all import/export handlers via setup.py and config
- use "handler key" lookup for all import/export commands
- fix logic bugs w/ CORE -> Trainwreck importer
2021-12-06 20:07:42 -06:00
Lance Edgar 0e28a6ee2b Some tweaks to expose CORE <-> Rattail import handlers in web app 2021-12-05 17:24:54 -06:00
Lance Edgar 4a36c417e7 Update changelog 2021-11-05 20:37:25 -05:00
Lance Edgar 1c9f1ef515 Add support for 2nd "member type" file in CORE member batch
still just feature preview mode here, this is terribly specific
2021-11-05 20:35:38 -05:00
Lance Edgar 0c817fb7d0 Update changelog 2021-11-04 21:28:25 -05:00
Lance Edgar 5f1d6d76ed Add batch to update CORE member records directly via SQL 2021-11-04 21:21:37 -05:00
Lance Edgar 7522dd14cb Add custdata importer for CORE Office -> Lane
to double-check sync issues
2021-11-04 17:42:38 -05:00
Lance Edgar affd8a6453 Update changelog 2021-08-31 22:43:08 -05:00
Lance Edgar 980c2fa952 Add CORE Office -> Lane op importer for Department 2021-08-31 22:41:32 -05:00
Lance Edgar 710f629d9c Update changelog 2021-08-02 09:09:00 -05:00
Lance Edgar ca723ffde8 Add email setting for CORE Office -> CORE Lane export 2021-07-22 12:15:26 -05:00
Lance Edgar 36b6109993 Update changelog 2021-07-21 20:18:57 -05:00
Lance Edgar 6c9d9964dc Add basic support for CORE Office -> CORE Lane export
just products data so far
2021-07-21 20:05:16 -05:00
Lance Edgar 236ae12d20 Update changelog 2021-06-11 18:06:00 -05:00
Lance Edgar 78a00ce89f Add basic (incomplete) support for CORE -> Trainwreck import
proves the concepts more or less, but needs a lot of polish yet
2021-02-18 20:04:00 -06:00
Lance Edgar a72fd9ef77 Use sku instead of upc when fetching CORE vendorItems record
since that is what API client now expects
2021-02-09 16:12:32 -06:00
Lance Edgar 83ba5c9ace Fix typo 2021-02-09 15:41:27 -06:00
Lance Edgar d0bb4b105d Add custom vendor catalog batch handler for CORE
capable of directly updating `vendorItems` etc. via CORE API
2021-02-09 15:31:43 -06:00
Lance Edgar 1be258246c Add make_corepos_api() convenience function 2021-02-09 14:28:38 -06:00
Lance Edgar 67618d4784 Fix CORE API -> Rattail datasync for ProductCost 2021-01-31 21:53:26 -06:00
Lance Edgar f61a0a7dd9 Add importer support for VendorItem
this was done mostly for CORE <-> CORE diffs
2021-01-30 13:17:45 -06:00
Lance Edgar ef68d4b2d0 Populate Vendor.id when importing from CORE API 2021-01-27 22:21:31 -06:00
Lance Edgar 95952c665e Add schema extension for Stores, importing from CORE API 2021-01-27 22:21:06 -06:00
Lance Edgar 9b00de26c6 Be sure to update Rattail Product, when VendorItem changes in CORE
b/c of the `Product.case_size` field
2021-01-27 10:12:46 -06:00
Lance Edgar 5b1305ddbd Don't choke when vendorItems record has no modified timestamp 2021-01-27 09:28:35 -06:00
Lance Edgar da55a07982 Add support for importing Product.case_size from CORE API 2021-01-27 09:21:02 -06:00
Lance Edgar 59abc4995e Fix 'size' and push 'unitofmeasure' when exporting to CORE Products 2021-01-21 18:16:56 -06:00
Lance Edgar ca14884c46 Don't choke when unit size is not decimal-compatible 2021-01-21 17:58:11 -06:00
Lance Edgar 2faa0cb18b Add support for importing full size, uom data from CORE
also add core-specific product handler and mixin, to find all UOM abbreviations
in the wild.
2021-01-21 17:41:13 -06:00
Lance Edgar 10c119ea60 Prevent importing zero as department number, from CORE API 2021-01-21 12:28:01 -06:00
Lance Edgar ba31725ad1 Update changelog 2020-09-19 17:24:16 -05:00
Lance Edgar deec1cd929 Add some common email profiles, for importer diff warnings 2020-09-19 14:03:54 -05:00
Lance Edgar ded09c719c Update changelog 2020-09-16 19:58:22 -05:00
Lance Edgar ae6700a530 Update changelog 2020-09-16 19:40:20 -05:00
Lance Edgar aff04035ff Add datasync support for CORE VendorItem -> ProductCost 2020-09-04 20:22:24 -05:00
Lance Edgar 580f2093ae Add schema, logic for importing CORE VendorItem -> ProductCost 2020-09-04 19:10:48 -05:00
Lance Edgar b96a4bc7b9 Only assign new CORE ID if not in dry run mode
b/c if dry run, we didn't really make the API call so there is no ID
2020-08-20 20:19:01 -05:00
Lance Edgar d3e2619944 Refactor the Rattail <-> CORE product importers
this should allow for more seamless "dual authority" mode
2020-08-20 20:00:13 -05:00
Lance Edgar de628b387a Convert CORE-specific version import handler into a mixin class
so that we don't have to "choose" it as our final handler
2020-08-19 22:31:56 -05:00
Lance Edgar 6dbf7cf174 Use custom data model where possible, when importing from CORE API
not sure if this really does much good, but what the heck
2020-07-30 21:07:39 -05:00
Lance Edgar 1fe48d91f6 Use member split_street() method when exporting to Catapult workbook 2020-07-21 15:07:54 -05:00
Lance Edgar 8037de7efe Add support for importing product last sold from CORE API 2020-07-15 21:19:27 -05:00
Lance Edgar 9f3cfa0d8e Add basic exporter for CORE -> Catapult Membership Workbook
this only does what i need it to for the moment...still missing equity fields
2020-07-13 11:04:32 -05:00
Lance Edgar a32753a04a Let CORE-POS datasync watcher use alternate "changes" table name
i needed this for sake of online demo, so that 2 separate rattail apps could
both watch the same CORE DB simultaneously
2020-07-09 17:01:23 -05:00
Lance Edgar 6ce4b59509 Add more schema extensions; importing support 2020-07-07 19:58:57 -05:00
Lance Edgar 4402d79052 Allow for missing vendor abbreviation, when importing from CORE 2020-06-29 19:06:57 -05:00
Lance Edgar 40cb18f0cc Avoid touching DB records when dry-run importing
just in case storage engine doesn't support transactions!
2020-04-15 20:54:35 -05:00
Lance Edgar a193a3458a Include product UPC as original item id, for Catapult export
in case data needs to be imported back into CORE, from spreadsheet
2020-04-15 20:54:35 -05:00
Lance Edgar 20e8aa97ca Try to be smarter about the "size" column for Catapult export 2020-04-15 20:54:33 -05:00
Lance Edgar 190ba506e5 Combine size and UOM for "size" column in export 2020-04-14 16:00:31 -05:00
Lance Edgar 6905b387d0 Add "alternate for" column in Catapult export, based on like codes
this is more of an FYI column, user must do with it what they will
2020-04-10 14:12:10 -05:00
Lance Edgar ae58b7c55a Refactor Catapult export a bit, for sake of "duplicate" item_id
also improve certain warnings and exclusion rules
2020-04-10 13:02:34 -05:00
Lance Edgar 7e450e11b1 Allow suppression of logging for unknown bottle deposits 2020-04-09 10:39:30 -05:00
Lance Edgar aefaaf8351 Fix how bottle deposit amounts are calculated, for Catapult export 2020-04-08 16:14:35 -05:00
Lance Edgar c330cfccb5 Use subdept. number and name for pf1 field in Catapult export 2020-04-08 16:13:51 -05:00
Lance Edgar c3ecf828fc Remove support for pos_menu_group field in Catapult export
since it's not clear what that value should be, "objectively"
2020-04-08 16:12:55 -05:00
Lance Edgar 74deef63ab Allow some warnings to be suppressed for Catapult inventory export 2020-04-08 14:15:51 -05:00
Lance Edgar 28f17ca31a Move a block of code
somehow it was stuck right in the middle of some other contiguous blocks, and
the sequence just seemed wrong
2020-04-01 17:21:25 -05:00
Lance Edgar 16c80082ad Log warning if null byte is detected in size field 2020-04-01 00:03:00 -05:00
Lance Edgar c5b1cf01af Dang it, size could also be None... 2020-03-31 23:29:10 -05:00
Lance Edgar fcbba9608c Remove null characters from product size field, during export 2020-03-31 23:26:37 -05:00
Lance Edgar 4a03a7f57d Dang it, use datetime instead of date, for that sorting hack 2020-03-31 23:11:46 -05:00
Lance Edgar d00e3b6312 Provide fall back date when sorting, to avoid None 2020-03-31 23:09:35 -05:00
Lance Edgar 2e5f7d3cd5 Add initial 'tax' support for Catapult export 2020-03-31 14:11:39 -05:00
Lance Edgar e71e06f837 Add 'location' to Catapult export 2020-03-30 13:32:02 -05:00
Lance Edgar d87c889d26 Add 'auto_discount' to Catapult export 2020-03-30 13:32:02 -05:00
Lance Edgar e3204993b1 Add 'memo' field to Catapult export 2020-03-30 13:32:02 -05:00
Lance Edgar c5e618d517 Add scale info fields to Catapult export 2020-03-30 13:32:02 -05:00
Lance Edgar e30cbf374e Add supplier info to Catapult export 2020-03-30 13:32:02 -05:00
Lance Edgar 6dc65f1aa5 Update various warnings to use product upc 2020-03-30 13:32:02 -05:00
Lance Edgar 45f05032fb Add 'pf1' (subdepartment number) to Catapult export 2020-03-30 13:32:02 -05:00
Lance Edgar c2c10de64b Add 'price_divider' for Catapult export 2020-03-30 13:32:02 -05:00
Lance Edgar 4cb42d06ea Add support for 'alt_id' and friends, in Catapult export
just the basic support here, for e.g. Zevia sodas where the single barcode
matches the pack
2020-03-30 13:32:02 -05:00
Lance Edgar 06f40f350e Add 'ideal_margin' for Catapult export 2020-03-30 13:31:59 -05:00
Lance Edgar 3a956c444d Add 'age_required' to Catapult export 2020-03-29 23:35:53 -05:00
Lance Edgar 5a75a99263 Add 'pos_menu_group' and 'weight_profile' to Catapult export 2020-03-29 23:13:52 -05:00
Lance Edgar 5e2fa46650 Fix some logging bugs 2020-03-27 20:57:23 -05:00
Lance Edgar 5a5927dce6 Add "low-hanging fruit" fields for Catapult inventory export 2020-03-27 20:50:36 -05:00
Lance Edgar 3d145d0314 Add very basic support for CORE -> Catapult Inventory Workbook export
more fields to come
2020-03-27 19:11:26 -05:00
Lance Edgar 4f300f1036 Prevent exporting "Change" data to CSV 2020-03-27 19:11:26 -05:00
Lance Edgar 99a67403f8 Move the CORE -> CSV exporter to subfolder 2020-03-27 19:08:34 -05:00
Lance Edgar 1fea95be97 Import Member.person_uuid from CORE 2020-03-18 13:15:37 -05:00
Lance Edgar 154722b78d Change how we import Member.id from CORE
to match what we do for `Customer.id`
2020-03-18 12:37:18 -05:00
Lance Edgar 6e51f36fc5 Import Member.number from CORE 2020-03-18 12:29:35 -05:00
Lance Edgar 8917316a21 Add 2-way sync for basic Member data, CORE <-> Rattail 2020-03-18 11:30:18 -05:00
Lance Edgar 9dbdb81f07 Add 2-way sync for customer contact data, for CORE API <-> Rattail 2020-03-17 18:52:08 -05:00
Lance Edgar 15a99164f2 Fix another refactoring bug 2020-03-17 16:40:29 -05:00
Lance Edgar 42184e34b7 Fix refactoring bugs 2020-03-17 16:36:31 -05:00
Lance Edgar cb63644c7d Add support for Rattail -> CORE export/sync for Member data
also refactor CORE -> Rattail logic to use `api.set_member()` etc.
2020-03-17 16:29:35 -05:00
Lance Edgar 8d47a1449c Add core_office_customer_account_url() convenience/config function 2020-03-17 12:46:13 -05:00
Lance Edgar 35c74ff996 Add data version importers for CorePerson, CoreVendor 2020-03-16 20:44:22 -05:00
Lance Edgar 8f9f77b6b7 Add proper importing for Customer/Person data from CORE API
includes datasync support.  i think it even works right, but we'll see
2020-03-16 19:45:54 -05:00
Lance Edgar 4a409bb80a Add new CorePerson data model, for use with customer sync 2020-03-16 16:57:07 -05:00
Lance Edgar 29166f4b1e Rename the old CORE Customer model, to CustData
it now has a new Customer model, so we use that where we can
2020-03-16 16:56:42 -05:00
Lance Edgar fe986f8e4d No need to convert cardNo to an int, since it already is 2020-03-16 16:05:48 -05:00
Lance Edgar 85c45ef57e Tweak CORE DB -> Rattail for Product, to match CORE API -> Rattail 2020-03-16 15:44:41 -05:00
Lance Edgar 36b8afb03b Add support for Customer data in CORE API -> Rattail import/sync 2020-03-15 19:29:47 -05:00
Lance Edgar c44dba6456 Fall back to empty string for some product fields, in Rattail -> CORE 2020-03-15 16:03:24 -05:00
Lance Edgar cd93d3e36b Add support for Department, Subdepartment, Product in Rattail -> CORE API 2020-03-15 15:54:15 -05:00
Lance Edgar ab8894ef0d Add importer, datasync for CORE-POS (API) -> Rattail 2020-03-15 14:28:22 -05:00
Lance Edgar 9aefbc872e Rename rattail import-corepos command to import-corepos-db
to prepare for `import-corepos-api`
2020-03-15 12:37:31 -05:00
Lance Edgar ffd451a700 Add convenience function for core_office_url() config 2020-03-14 18:38:12 -05:00
Lance Edgar af1e38aa18 Oerhaul the Vendor import/export between Rattail and CORE
also, add new DB schema specific to this integration, to hold PKs etc.
2020-03-04 19:05:55 -06:00
Lance Edgar f9071ac6e9 Remove DB-related things from the Rattail -> CORE datasync consumer
since that should only use API, going forward
2020-03-04 13:29:47 -06:00
Lance Edgar 4180382250 Add support for phone, fax, email in Rattail -> CORE export 2020-03-04 13:05:20 -06:00
Lance Edgar 75ba08b9fc Move "direct DB" CORE importer logic, to subpackage
i.e. `rattail_corepos.corepos.importing.db` is now the place for direct DB
importers, and `rattail_corepos.corepos.importing` will become the place for
proper API-based importers
2020-03-03 23:25:37 -06:00
Lance Edgar 0298e63384 Add initial Rattail -> CORE-POS export logic
only allows "update" for Vendor model so far.  more to come after testing...
2020-03-03 21:45:11 -06:00
Lance Edgar 6f03461114 Add datasync watcher for trigger-populated "changes" table in CORE 2020-03-01 20:00:45 -06:00
Lance Edgar caef131d7c Prefer null over empty string, for vendor contact info 2020-03-01 19:59:22 -06:00
Lance Edgar c016c6aa6e Set regular price type when importing CORE -> Rattail 2020-02-27 21:53:21 -06:00
Lance Edgar 2b8478ef0b Fallback to default handler when no config available
e.g. when showing help for the command
2020-02-27 21:52:50 -06:00
Lance Edgar fa1e0c93e2 Provide default node title for CSV export
no need to throw an error if config doesn't define one
2019-10-28 01:26:47 -05:00
Lance Edgar 131e5d7c1f Add importer models for MemberDate, MemberContact 2019-10-25 16:30:18 -05:00
Lance Edgar aa356b652e Cleanup attribute names for CORE MemberInfo model 2019-10-25 15:33:57 -05:00
Lance Edgar e76aa9a966 Change the sections used for corepos db config 2019-10-10 20:13:39 -05:00
Lance Edgar 8da0f1b17f Cleanup attribute names for CORE Employee model 2019-08-14 21:02:46 -05:00
Lance Edgar c88277f478 Cleanup attribute names for CORE Product model 2019-08-14 20:48:05 -05:00
Lance Edgar 66fce9b066 Remove unused attribute 2019-07-30 23:30:19 -05:00
Lance Edgar 0b1a8f9617 Add basic crepes import-csv command, for CSV -> CORE import 2019-07-29 15:33:05 -05:00
Lance Edgar 83b1f93d99 Add crepes export-csv command, for data export to CSV files 2019-07-29 12:09:56 -05:00
Lance Edgar 9d2411bccb Add commands for import/export of data between CORE systems
just a staring point for now, only "operational" data for the most part
2019-07-28 14:52:50 -05:00
Lance Edgar 9ede5b339d Cleanup attribute names for CORE Subdepartment model 2019-07-25 16:14:24 -05:00
Lance Edgar 2a37bb5a49 Cleanup attribute names for CORE Department model 2019-07-23 19:44:32 -05:00
Lance Edgar bfb6a4c7ec Tweak vendor importer per renamed attributes 2019-07-18 09:44:51 -05:00
Lance Edgar fcd3c6e49d Add "import batch" support for Square -> CORE-POS (TransactionDetail) 2018-11-22 20:36:27 -06:00
Lance Edgar 4193503719 Add basic transaction importer for Square -> CORE-POS 2018-11-22 16:47:03 -06:00
Lance Edgar 810d4726c3 Initial commit 2018-06-01 15:14:49 -05:00