teknologi-umum / pyrite

Fool's gold
0 stars 1 forks source link

[Discussion] Main schema #11

Open qepo17 opened 6 months ago

qepo17 commented 6 months ago

image

I have questions about the schema and let's discuss the approach we want to take

Also, this is not a question, but IMO, the database should be fine using airtable/nocodedb instead of Postgres. Let's discuss it as well if you have an opinion regarding this

aldy505 commented 6 months ago
  • Why there is the IDR Amount? Although our goal is to create an Open Collection IDR version, why not just use original_currency with IDR type and original_amount? I think that is enough, or maybe you have an example of why we need the IDR amount.

The IDR amount and the original amount should be kept separate. If the account entry is a payment using USD currency, the original amount and currency should be kept shown. It'd be weird if suddenly there is an entry of IDR 452.612,89, where do this weird number come from?

  • Is the transaction code autogenerated or does it come from somewhere or manually input?

Should be id if I'm not mistaken, I missed that when approving the PR. It should be autogenerated by the database.

  • Should we have an explicit column explaining where the money comes from for income type?

Part of me say we should, but the other say we shouldn't. If you want to add another column to state the source of fund, we should move to double entry bookkeeping though (see https://www.zoho.com/books/guides/single-entry-and-double-entry-bookkeeping.html)

Also, this is not a question, but IMO, the database should be fine using airtable/nocodedb instead of Postgres. Let's discuss about it as well if you have opinion regarding this

I'm not against NocoDB or Postgres. Both are fine, but the problem only relies on how would I add another entry on it.

YogiPristiawan commented 6 months ago

Is the transaction code autogenerated or does it come from somewhere or manually input?

i'm sorry, i though there was an action where user needed to manually input the transaction number from an invoice. therefore the transaction_code was created

aldy505 commented 6 months ago

Is the transaction code autogenerated or does it come from somewhere or manually input?

i'm sorry, i though there was an action where user needed to manually input the transaction number from an invoice. therefore the transaction_code was created

Yes, you're right. No need to be sorry about it. I need to input the account entry manually. It'd be a horror to have it automated, as it's my personal bank account.

YogiPristiawan commented 6 months ago

Ok. However, is it necessary to include input for the transaction or invoice number, or can we disregard it?

qepo17 commented 6 months ago

I'm not against NocoDB or Postgres. Both are fine, but the problem only relies on how would I add another entry on it.

@aldy505 I think to make better decision about the database we are going to use, what do you think in mind about flow to input the transaction? Who will have control to input? Is it us only (admin)? Or everyone can input?