You are here:Home»KB»Programming»General»My QWcrm Notes
Wednesday, 29 October 2025 09:16

My QWcrm Notes

Written by

This is a temporary holding page for my QWcrm notes.

 

General Finance notes from J

  • A paid invoice or expense is paid/closed/zero balanced, it stays closed. Once this transaction is done, it is done.

Vouchers

  • MPV (Multi Purpose Voucher) = Gift Card
  • SPV (Single Purpose Voucher) = Phone Card

Payment System

  • Payment.php
  • PaymentTypeCreditnote.php
    • Payment Types controls the specific logic for the target of the payment eg: Creditnote, Expense, Invoice, Otherincome
  • PaymentMethodCreditnote.php
    • Payment Methods control the specific logic for the source of the payment eg: Cash, Cheques, Credit Notes, Other Incomes.....
    • These will appear as available payment menthos on the payment page, filtered when required i.e. a creditnote cannot be used to pay for a credit note, same for Vouchers (giftcards/SPV/MPV)

Credit Notes

  • What are they for
    • General
      • Add a credit note to reduce the amount you owe your supplier, or record a refund received from a supplier.
      • There are a few types of credit note and are based on payment direction.
      • These can be used like cash payments but are not included in financial calculations for the purpose of turnover, profit or tax.
      • Once an invoice or expense has been closed, and this also applies when closed with a credit note, it stays closed, this transaction is complete. Future refunds and credits can reference an invoice or expense but not change those transactions.
      • A credit note is issued or received referenced to an expense or invoice it doe snot alter it. The credit will sit on a client or supplier to be used on a later
      • When a sales credit note is issued
      • A credit note can be used to clear a balance on a partial or zero paid invoice or expense without using real money.
      • A credit note in QWcrm allows you to split it between real payments (refunds) and credit that can be used on other things you sell.
    • Types (What are they for specifically)
      • Sales Credit Note (Client)
        • Store credit for a client, no attached invoice, a gesture of goodwill etc..
      • Sales Credit Note (Invoice)
        • Can use these to zero out a client invoice that is unpaid or zero paid without using a real payment.
      • Purchase Credit Note (Supplier)
        • A supplier sends you this to give you store credit and will NOT be attached/referenced to an invoice.
        • These will be an uncommon thing but still exist.
        • This can be applied to a future expense from this supplier.
      • Purchase Credit Note (Expense)
        • A supplier sends you this to give you store credit and will be attached/referenced to an invoice.
        • This can be applied to a future expense from this supplier.
  • Button Locations
    • client:details
      • Sales Credit Note (Client)
        • No restrictions
        • Controlled by creditnote::checkRecordCanBeCreated()
        • Used to refund real money to a client without an invoice, or they can use the credit to purchase other items
    • invoice:details
      • Sales Credit Note (Invoice)
        • Must have an invoice_id and have == 0 balance
        • Controlled by creditnote::checkRecordCanBeCreated()
        • Used to close invoices with outstanding balances without accepting or sending real money
    • supplier:details
      • Purchase Credit Note (Supplier)
        • No restrictions
        • Controlled by creditnote::checkRecordCanBeCreated()
        • Used to reduce the amount you owe your supplier, or record a refund received from a supplier.
        • The refund can be in the form of credit with the supplier (via their credit note system) or a real payment such as cash or bank transfer.
    • expense:details
      • Purchase Credit Note (Expense)
        • Must have an expense_id and have == 0 balance
        • Controlled by creditnote::checkRecordCanBeCreated()
        • Used to reduce the amount you owe on an expense, or record a refund received from a supplier against an expense.
        • The refund can be in the form of credit with the supplier (via their credit note system) or a real payment such as cash or bank transfer.
    • creditnote:details
      • Record Refund / Refund to Client
        • assign a real payment to the client ? or supplier
        • {if ($creditnote_details.status == 'unused' || $creditnote_details.status == 'partially_used') && $creditnote_details.client_id}
        • This allows you to record sending real money to a client or supplier.
      • Apply Credit Note to Invoice
        • Use the credit note as payment on an invoice 
        • {if $creditnote_details.status == 'unused' && $creditnote_details.invoice_id}
        • This allows you to easily use the credit note as a payment against the invoice specified on the credit note.
          • This is the same as: the Invoice --> Apply Payment --> Select Credit Note and fill in the CR details.
      • Apply Credit Note to Expense
        • Use the credit note as payment on an expense 
        • {if $creditnote_details.status == 'unused' && $creditnote_details.expense_id}
        • This allows you to easily use the credit note as a payment against the expense specified on the credit note.
          • This is the same as: the Expense --> Apply Payment --> Select Credit Note and fill in the CR details.
  • Creditnote::checkRecordCanBeCreated()
    • This functions checks if this type of credit note is allowed, it is not currently checking if the credit note will be applied successfully.
    • Different Credit notes process types (do I need a standalone version)
      • Sales Credit Note (Standalone) - (client:details)
        • Used to refund real money to a client without an invoice, or they can use the credit to purchase other items
      • Sales Credit Note - (invoice:details)
        • Used to close invoices with outstanding balances without accepting or sending real money
      • Purchase Credit Note (Standalone) - (supplier:details)
        • Used to refund real money to a supplier without an expense, or they can use the credit to purchase other items
        • Used to record a refund from a supplier without a related expense.
        • The refund can be in the form of credit with the supplier (via their credit note system) or a real payment such as cash or bank transfer.
      • Purchase Credit Note - (expense:details)
        • Used to record a refund from a supplier with a related expense (eg: parts and services).
        • The refund can be in the form of credit with the supplier (via their credit note system) or a real payment such as cash or bank transfer.
  • Payment::getCreditnoteActionTypes()
    • Gets the different CR types from the DB
      • sales_apply => Sales Apply
      • sales_refund => Sales Refund
      • purchase_apply => Purchase Apply
      • purchase_refund => Purchase Refund
  • Links (might need sorting)

How To (in QWcrm)

  • Invoice partially paid (dead guy scenario)
  • Invoice fully paid - refund
  • Invoice partially paid - refund
  • Expense fully paid - refund
  • Expense partially paid - refund
  • Store Credit - Using credit notes not giftcard.

Credit note Q and A from J

  • Close with a sales invoice, then raise a standalone creditnote for a refund? or are they tied in some how?
  • Do i need a credit note system for expenses?
    • = Yes, otherwise how would i record refunds
    • When you get a refund from a supplier you can add it as a cash payment, you do not have to use the credit note system but this will lack full tracking and is only for small transactions such as `Petty Cash` transactions.
  • Do i need a credit note system for otherincomes? if I dont get the money, there is no other income?
    • = No, you would only enter this when you get the money, not before.
  • How to handle an expense with part payment?
    • Post as cash received, i.e. cash ??
  • How to refund a part paid expense
    1. zero the balance with a CR (using non-standalone via expense:details)
    2. refund the real payments by the client via another credit note
  • Dead guy scenario - has only paid half of his bill but is now dead, how do i write off his balance
    • = `Sales Credit Note` to zero the balance on the invoice. No real money will be used but I can close the invoice and it no longer annoy me.
  • Credit note = Credit towards a cost
  • Credit note must be attached to a purchase invoice or sales invoice
  • A debit note can be used to add a payments.
    • I am not sure what these are, or if needed.

 

 

 

 

 

 

 

Read 15 times Last modified on Thursday, 30 October 2025 17:00