bcgov / entity

ServiceBC Registry Team working on Legal Entities
Apache License 2.0
23 stars 59 forks source link

RL Amendment - Deactivate 'Amend' button when only 1 Vehicle Collateral is present #11510

Closed chdivyareddy closed 2 years ago

chdivyareddy commented 2 years ago

Current Behavior: User can do an Amendment when there is only 1 vehicle collateral.

Base Registration: 100446B in DEV Screenshot (42).png

image.png


Should look like this: Screen Shot 2022-03-11 at 12 31 31 PM

chdivyareddy commented 2 years ago

@jordiwes , Please take a look at the following:

Eg: 256820N in DEV.

image.png

image.png

Eg: 256879N in DEV.

image.png

Verification statement: https://app.zenhub.com/files/157936592/5d3b44cb-e248-4c29-9a96-e2b7274015f8/download

jordiwes commented 2 years ago

Hi Divya, For the first, the API is returning a vehicle count of 0: { "baseRegistrationNumber": "256820N", "changes": [{ "baseRegistrationNumber": "256820N", "clientReferenceId": "", "createDateTime": "2022-03-28T18:41:52+00:00", "expireDays": 525, "lastUpdateDateTime": "2022-03-28T18:41:52+00:00", "path": "", "registeringName": "", "registeringParty": "DIVYA DEV PAD", "registrationClass": "RENEWAL", "registrationDescription": "RENEWAL", "registrationNumber": "256822N", "registrationType": "RE", "securedParties": "GOLDEN MILE MOTORS LTD", "statusType": "ACT", "vehicleCount": 0 }, { "baseRegistrationNumber": "256820N", "clientReferenceId": "", "createDateTime": "2022-03-28T18:35:04+00:00", "expireDays": 525, "lastUpdateDateTime": "2022-03-28T18:41:52+00:00", "path": "", "registeringName": "", "registeringParty": "DIVYA DEV PAD", "registrationClass": "RENEWAL", "registrationDescription": "RENEWAL", "registrationNumber": "256821N", "registrationType": "RE", "securedParties": "GOLDEN MILE MOTORS LTD", "statusType": "ACT", "vehicleCount": 0 }], "clientReferenceId": "", "createDateTime": "2022-03-28T18:34:15+00:00", "expand": false, "expireDays": 525, "lastUpdateDateTime": "2022-03-28T18:41:52+00:00", "path": "", "registeringName": "", "registeringParty": "DIVYA DEV PAD", "registrationClass": "PPSALIEN", "registrationDescription": "REPAIRERS LIEN", "registrationNumber": "256820N", "registrationType": "RL", "securedParties": "GOLDEN MILE MOTORS LTD", "statusType": "ACT", "vehicleCount": 1 }

For the second, the API is returning a vehicle count of 1: [{ "baseRegistrationNumber": "256879N", "changes": [{ "baseRegistrationNumber": "256879N", "clientReferenceId": "", "createDateTime": "2022-04-12T18:06:53+00:00", "expireDays": 180, "lastUpdateDateTime": "2022-04-12T18:06:53+00:00", "path": "", "registeringName": "", "registeringParty": "DIVYA DEV PAD", "registrationClass": "AMENDMENT", "registrationDescription": "PARTIAL DISCHARGE", "registrationNumber": "256880N", "registrationType": "AP", "securedParties": "THE BANK OF NOVA SCOTIA", "statusType": "ACT", "vehicleCount": 1 }], "clientReferenceId": "TW37838C83700", "createDateTime": "2022-04-12T17:59:34+00:00", "expand": false, "expireDays": 180, "lastUpdateDateTime": "2022-04-12T18:06:53+00:00", "path": "", "registeringName": "", "registeringParty": "DIVYA DEV PAD", "registrationClass": "PPSALIEN", "registrationDescription": "REPAIRERS LIEN", "registrationNumber": "256879N", "registrationType": "RL", "securedParties": "THE BANK OF NOVA SCOTIA", "statusType": "ACT", "totalRegistrationCount": 59, "vehicleCount": 3 }

chdivyareddy commented 2 years ago

@doug-lovett Can you please take a look at this, thanks!!

doug-lovett commented 2 years ago

@chdivyareddy Please retest, I updated a db view to correct the serial collateral count.

chdivyareddy commented 2 years ago

Thanks for checking Doug!

@jordiwes @doug-lovett , please take a look at the following scenario in DEV.

Reg No: 256879N in DEV

doug-lovett commented 2 years ago

Updated GET individual reg summary endpoint /ppr/api/v1/financing-statements/registrations/{reg_num} to return vehicleCount.

chdivyareddy commented 2 years ago

Hi @doug-lovett , Amend button is not deactivated for RL when there is only 1 vehicle collateral left. Please take a look at it, thanks!!

Eg: Reg no: 256879N, 256641N in DEV.

image.png

doug-lovett commented 2 years ago

GET https://bcregistry-dev.apigee.net/ppr/api/v1/financing-statements/registrations/256879N Returns: { "baseRegistrationNumber": "256879N", "changes": [ { "accountId": "2753", "baseRegistrationNumber": "256879N", "clientReferenceId": "", "createDateTime": "2022-04-13T19:33:35+00:00", "path": "", "registeringName": "", "registeringParty": "DIVYA DEV PAD", "registrationClass": "AMENDMENT", "registrationDescription": "PARTIAL DISCHARGE", "registrationNumber": "256883N", "registrationType": "AP", "securedParties": "THE BANK OF NOVA SCOTIA", "vehicleCount": 1 }, { "accountId": "2753", "baseRegistrationNumber": "256879N", "clientReferenceId": "", "createDateTime": "2022-04-12T18:06:53+00:00", "path": "", "registeringName": "", "registeringParty": "DIVYA DEV PAD", "registrationClass": "AMENDMENT", "registrationDescription": "PARTIAL DISCHARGE", "registrationNumber": "256880N", "registrationType": "AP", "securedParties": "THE BANK OF NOVA SCOTIA", "vehicleCount": 2 } ], "clientReferenceId": "TW37838C83700", "createDateTime": "2022-04-12T17:59:34+00:00", "expireDays": 178, "inUserList": false, "lastUpdateDateTime": "2022-04-13T19:33:35+00:00", "path": "", "registeringName": "", "registeringParty": "DIVYA DEV PAD", "registrationClass": "PPSALIEN", "registrationDescription": "REPAIRERS LIEN", "registrationNumber": "256879N", "registrationType": "RL", "securedParties": "THE BANK OF NOVA SCOTIA", "statusType": "ACT", "vehicleCount": 3 }

GET https://bcregistry-dev.apigee.net/ppr/api/v1/financing-statements/registrations/256641N Returns: { "baseRegistrationNumber": "256641N", "changes": [ { "accountId": "2753", "baseRegistrationNumber": "256641N", "clientReferenceId": "", "createDateTime": "2022-04-14T15:52:16+00:00", "path": "", "registeringName": "", "registeringParty": "DIVYA DEV PAD", "registrationClass": "AMENDMENT", "registrationDescription": "PARTIAL DISCHARGE", "registrationNumber": "256885N", "registrationType": "AP", "securedParties": "CANADIAN TEK TRUCK CORP.", "vehicleCount": 1 }, { "accountId": "2753", "baseRegistrationNumber": "256641N", "clientReferenceId": "", "createDateTime": "2022-03-16T17:12:26+00:00", "path": "", "registeringName": "", "registeringParty": "DIVYA DEV PAD", "registrationClass": "RENEWAL", "registrationDescription": "RENEWAL", "registrationNumber": "256708N", "registrationType": "RE", "securedParties": "CANADIAN TEK TRUCK CORP.", "vehicleCount": 2 }, { "accountId": "2753", "baseRegistrationNumber": "256641N", "clientReferenceId": "", "createDateTime": "2022-03-14T20:41:39+00:00", "path": "", "registeringName": "", "registeringParty": "DIVYA DEV PAD", "registrationClass": "RENEWAL", "registrationDescription": "RENEWAL", "registrationNumber": "256678N", "registrationType": "RE", "securedParties": "CANADIAN TEK TRUCK CORP.", "vehicleCount": 2 }, { "accountId": "2753", "baseRegistrationNumber": "256641N", "clientReferenceId": "", "createDateTime": "2022-03-14T19:30:43+00:00", "path": "", "registeringName": "", "registeringParty": "DIVYA DEV PAD", "registrationClass": "RENEWAL", "registrationDescription": "RENEWAL", "registrationNumber": "256669N", "registrationType": "RE", "securedParties": "CANADIAN TEK TRUCK CORP.", "vehicleCount": 2 }, { "accountId": "2753", "baseRegistrationNumber": "256641N", "clientReferenceId": "", "createDateTime": "2022-03-14T19:29:39+00:00", "path": "", "registeringName": "", "registeringParty": "DIVYA DEV PAD", "registrationClass": "COURTORDER", "registrationDescription": "COURT ORDER", "registrationNumber": "256668N", "registrationType": "CO", "securedParties": "CANADIAN TEK TRUCK CORP.", "vehicleCount": 2 }, { "accountId": "2753", "baseRegistrationNumber": "256641N", "clientReferenceId": "", "createDateTime": "2022-03-14T05:15:02+00:00", "path": "", "registeringName": "", "registeringParty": "DIVYA DEV PAD", "registrationClass": "RENEWAL", "registrationDescription": "RENEWAL", "registrationNumber": "256649N", "registrationType": "RE", "securedParties": "CANADIAN TEK TRUCK CORP.", "vehicleCount": 2 }, { "accountId": "2753", "baseRegistrationNumber": "256641N", "clientReferenceId": "", "createDateTime": "2022-03-12T22:59:16+00:00", "path": "", "registeringName": "", "registeringParty": "DIVYA DEV PAD", "registrationClass": "RENEWAL", "registrationDescription": "RENEWAL", "registrationNumber": "256645N", "registrationType": "RE", "securedParties": "CANADIAN TEK TRUCK CORP.", "vehicleCount": 2 }, { "accountId": "2753", "baseRegistrationNumber": "256641N", "clientReferenceId": "", "createDateTime": "2022-03-12T22:58:35+00:00", "path": "", "registeringName": "", "registeringParty": "DIVYA DEV PAD", "registrationClass": "COURTORDER", "registrationDescription": "COURT ORDER", "registrationNumber": "256644N", "registrationType": "CO", "securedParties": "CANADIAN TEK TRUCK CORP.", "vehicleCount": 2 } ], "clientReferenceId": "", "createDateTime": "2022-03-12T22:55:57+00:00", "expireDays": 1047, "inUserList": false, "lastUpdateDateTime": "2022-04-14T15:52:16+00:00", "path": "", "registeringName": "", "registeringParty": "DIVYA DEV PAD", "registrationClass": "PPSALIEN", "registrationDescription": "REPAIRERS LIEN", "registrationNumber": "256641N", "registrationType": "RL", "securedParties": "CANADIAN TEK TRUCK CORP.", "statusType": "ACT", "vehicleCount": 2 }

doug-lovett commented 2 years ago

@jordiwes The above response looks correct to me. Can you check that the UI is refreshing the row to pick up the current vehicle count?

jordiwes commented 2 years ago

I put a question to you in the chat :)

chdivyareddy commented 2 years ago

Verified!

image.png