Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: #808 Payment referenceType NULL due to bad migration #809

Merged
merged 2 commits into from
Jan 19, 2024

Conversation

mildred
Copy link
Contributor

@mildred mildred commented Jan 16, 2024

Fix #808

@mildred mildred self-assigned this Jan 16, 2024
@mildred mildred force-pushed the mildred/808-fix-payment-reference-type branch from 071d449 to 83af275 Compare January 16, 2024 22:56
@Isaac-GC
Copy link
Collaborator

Isaac-GC commented Jan 17, 2024

LGTM!

A good point was raised here: #808 (comment)

Taking a second look jic

@Isaac-GC Isaac-GC self-requested a review January 17, 2024 22:41
@Isaac-GC
Copy link
Collaborator

Isaac-GC commented Jan 18, 2024

Hi @mildred,

The patch was looking to be marking both types, sales and payment, as SalesInvoice's. Please see the above code in the review that should fix both types of invoices.

If also possible, could I please have you update/add the package.json with version code 0.20.1?

@mildred mildred force-pushed the mildred/808-fix-payment-reference-type branch from 4599e77 to dcbfa9f Compare January 19, 2024 22:40
Comment on lines 4 to 9
await dm.db!.knex!('Payment')
.where({ referenceType: null })
.update({ referenceType: 'SalesInvoice' });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update this to the following please?

  await dm.db!.knex!('Payment')
    .where({ referenceType: null })
    .andWhere({ paymentType: 'Receive' })
    .update({ referenceType: 'SalesInvoice' });

  await dm.db!.knex!('Payment')
    .where({ referenceType: null })
    .andWhere({ paymentType: 'Pay' })
    .update({ referenceType: 'PurchaseInvoice' });

backend/patches/index.ts Show resolved Hide resolved
@mildred mildred merged commit dac1b24 into master Jan 19, 2024
4 checks passed
@mildred mildred deleted the mildred/808-fix-payment-reference-type branch January 19, 2024 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Payments not showing up
2 participants