Within a product we are using COM based iBO code for processing of registrations. For some clients we have included the capabilities to include discounts on the registrations via discount functions containing a negative amount to offset the cost of the registration in other functions.
For example:
Main Registration = $100, Discount = -$20, Total Cost = $80.
This code is within a product we created and is not using eSeries any other components other than iBO.
The issue that we are experiencing is dealing with discounts that are 100% off. When attempting to process we receive an iBO error similar to the following (I have obfuscated some of the field data):
Err Num: 1000 - Source: (Microsoft OLE DB Provider for SQL Server - iboDataServer.CDataRequest.ExecInsert): Unknown error. Description: Violation of PRIMARY KEY constraint 'PK_Trans'. Cannot insert duplicate key in object 'dbo.Trans'. The duplicate key value is (0, 1, 1). Database=database SQL Statement=INSERT INTO Trans
(TRANS_NUMBER, LINE_NUMBER, BATCH_NUM, OWNER_ORG_CODE, SOURCE_SYSTEM, JOURNAL_TYPE, TRANSACTION_TYPE, TRANSACTION_DATE, BT_ID, ST_ID, INVOICE_REFERENCE_NUM, DESCRIPTION, CUSTOMER_NAME, CUSTOMER_REFERENCE, REFERENCE_1, SOURCE_CODE, PRODUCT_CODE, EFFECTIVE_DATE, PAID_THRU, MONTHS_PAID, FISCAL_PERIOD, DEFERRAL_MONTHS, PSEUDO_ACCOUNT, GL_ACCT_ORG_CODE, GL_ACCOUNT, DEFERRED_GL_ACCOUNT, INVOICE_CHARGES, INVOICE_CREDITS, QUANTITY, UNIT_PRICE, TERMS_CODE, ACTIVITY_SEQN, POSTED, PROD_TYPE, ACTIVITY_TYPE, ACTION_CODES, TICKLER_DATE, DATE_ENTERED, ENTERED_BY, SUB_LINE_NUMBER, INSTALL_BILL_DATE, TAXABLE_VALUE, SOLICITOR_ID, INVOICE_ADJUSTMENTS, INVOICE_LINE_NUM, MERGE_CODE, SALUTATION_CODE, SENDER_CODE, IS_MATCH_GIFT, MATCH_GIFT_TRANS_NUM, MATCH_ACTIVITY_SEQN, MEM_TRIB_ID, RECEIPT_ID, DO_NOT_RECEIPT, CC_STATUS, CAMPAIGN_CODE, IS_FR_ITEM, ENCRYPT_CC_NUMBER, ENCRYPT_CC_EXPIRE, PAYMENT_TYPE, CHECK_NUMBER, CC_NUMBER, CC_EXPIRE, CC_AUTHORIZE, AMOUNT, ADJUSTMENT_AMOUNT, ISSUE_NUMBER, ISSUE_DATE, CC_NAME)
VALUES (0, 1, '20120105', 'ORG', 'MEETING', 'IN', 'DIST', '20120105', '2005555', '252555', 103453, 'DINNER12-Board Dinner, '', '', '', '', 'DINNER12', '20121231', NULL, 1, 201201, 0, 'ORG-MEETING-DINNER12/MAIN', 'ORG', '7777-7777-77777', '7777-7777-77775', 100, 0, 0, 0, '', 0, 0, '', '', '', NULL, '20120106', '-IBO', 1, NULL, 0, '', 0, 0, '', '', '', 0, 0, 0, '', 0, 0, '', '', '0', '95FB226BB48F992BA5C8E3E712EABBA1ED7BF6E7418EFE03', '5B5695D9F76C342B', '', 'VISA', '************1111', '*****', '12345', -100, 0, '', '', 'Dinner') Count=[1]
Unknown error. Description: Violation of PRIMARY KEY constraint 'PK_Trans'. Cannot insert duplicate key in object 'dbo.Trans'. The duplicate key value is (0, 1, 1).
Another instance of the error appears for the discount function line item.
Here's another aspect of the issue. This is occurring with one instance of the application for a client but another client running the same code does not have this error; iBO is allowing the 100% discounts. The only difference I have seen is that the client where the code is working is running iMIS 15.1.3.3391 whereas the client where this feature is failing has 15.1.3.8845.
So to summarize:
1. iBO code is in a product that allows for registrations and discount functionality using discount function codes. The application is .NET and uses Interop assemblies to bind to the COM libraries. The versions registered on the client servers are applicable to the iMIS versions and the Interops have been generated specific to those versions.
2. Most discounts are less than 100% and those that are appear to be working properly.
3. Discounts that are 100% work for one client whereas another client there is a Trans insert error in which a Trans Number of 0 attempts to be inserted into the database.
Has anyone ran into this? Could this be version or even system (OS) specific? Any suggestions are appreciated.
Thank you,
Dave Spina