Add support for importing MemberEquityPayment from CORE-POS DB
SQL only, no API for now
This commit is contained in:
parent
35e24422a2
commit
a57f29fe1a
8 changed files with 248 additions and 15 deletions
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2020 Lance Edgar
|
||||
# Copyright © 2010-2023 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -55,7 +55,14 @@ class ImportCOREPOSDB(commands.ImportSubcommand):
|
|||
handler_key = 'to_rattail.from_corepos_db_office_op.import'
|
||||
|
||||
def add_parser_args(self, parser):
|
||||
super(ImportCOREPOSDB, self).add_parser_args(parser)
|
||||
super().add_parser_args(parser)
|
||||
|
||||
parser.add_argument('--corepos-dbtype', metavar='TYPE', default='office_op',
|
||||
choices=['office_op', 'office_trans'],
|
||||
help="Config *type* for CORE-POS database engine to be used as "
|
||||
"host. Default type is 'office_op' - this determines which "
|
||||
"config section is used with regard to the --corepos-dbkey arg.")
|
||||
|
||||
parser.add_argument('--corepos-dbkey', metavar='KEY', default='default',
|
||||
help="Config key for CORE POS database engine to be used as the \"host\", "
|
||||
"i.e. the source of the data to be imported. This key " "must be "
|
||||
|
@ -64,6 +71,7 @@ class ImportCOREPOSDB(commands.ImportSubcommand):
|
|||
|
||||
def get_handler_kwargs(self, **kwargs):
|
||||
if 'args' in kwargs:
|
||||
kwargs['corepos_dbtype'] = kwargs['args'].corepos_dbtype
|
||||
kwargs['corepos_dbkey'] = kwargs['args'].corepos_dbkey
|
||||
return kwargs
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue