◄ ► | Muuda | Home | Admin | en de fr et | Sign in

#4507 (Points of sale (delivery notes and monthly invoicing))

by Luc Saffre · in Developers · assigned to Luc Saffre

Kokkuvõte

Basic idea is how to make Lino Cosi useable in a small shop where they usually have cash or card payment (point of sales) and sometimes deferred invoicing.

Children

Kommentaarid

  • 4 aastat, 3 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : I am still adapting the test suite after two minor changes. Side effect: roger demo project no longer verifies VAT id online. Only the pierre demo project does this. Because the online validation sometimes fails, causing different datacheck messages, and our doctests to fail.
  • 4 aastat, 3 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : The StartNewSale quicklink is still being displayed even when the User.sales_journal is empty. It displays the link, and when you click on it, you get "no permission to execute this action". That's stupid. Indeed the admin_main_base.html should check whether the quicklink has permission. I am medita...
  • 4 aastat, 3 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : Now I plan to try some manual tests. Maybe we want a "Miscellaneous" partner also with sales_method "pos" (in cosi5). When thinking with Sharif about it, we said that such a partner is not needed if we say that Lino can book movements without partner to the Customers account. Currently he doesn't al...
  • 4 aastat, 3 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : Uff. I finally pushed my work of the last two weeks. We now have a proof of concept (POC) for a point of sale (POS). But it's just a POC and this ticket will sleep now until somebody comes and wakes it up. The missing pieces are support for EAN codes and (more fundamentally) communication with the m...
  • 4 aastat, 3 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : Seems that my local work is ready for commit. Except one thing: documentation. This must wait for tomorrow.
  • 4 aastat, 3 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : NB for the shop project I don't currently know whether it needs POS functionality. A webshop needs to know about payment methods. But does it also require full accounting functionality? No because it won't even allow for debts to occur. If the online payment fails, it just cancels the sales operatio...
  • 4 aastat, 3 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : I see it was quite some work for Sharif to adapt the test suites to having a new model PaymentMethod everywhere. And now I am having the same fun again for undoing his work (partly). If there is somebody to blame, then blame me. But I don't even regret it. C'est la vie.
  • 4 aastat, 3 kuud ago by Luc Saffre in reply to Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : I have no clear explanation for the changes in docs/plugins/ledger.rst, but intuitively I say that they are normal...
  • 4 aastat, 3 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) (1 reply) : I now started to adapt the test suite. Each change raises the question "Do we want this change?". For example docs/dev/admin_main.rst : yes, in Jane we don't want a "Start new sale" action.
  • 4 aastat, 3 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : Also the CommonAccounts for online payment and credit card payments should exist only when has_payment_methods.
  • 4 aastat, 3 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : Yes, I added a plugin option ledger.has_payment_methods, which is False by default. And in that case the PaymentMethod model doesn't even exist. I think that this is what we actually want in the initial use case of a Lino Cosi. It is for enterprises that don't have a point of sales, they either don...
  • 4 aastat, 3 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : The book test suite now ran fully on my machine. About 20 trivial failures. I consider adding a new plugin option sales.cash_payments, and the new voucher type and even payment methods would not exists when this option is off.
  • 4 aastat, 3 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : I started to dive into this with Sharif, but we got interrupted. I have some local work waiting to continue. Our next step is basically to get demo data that illustrates the use cases described in my 2022-06-18 blog post.
  • 4 aastat, 4 kuud ago by Luc Saffre in reply to Sharif Mehedi about #4507 (Points of sale (delivery notes and monthly invoicing)) : Yes, accounting is a world apart. Don't worry. Let's look at it together when I have more time (not this week any more). And it makes sense to leave the "accounting stuff" to me, there is so much other work to do for you.
  • 4 aastat, 4 kuud ago by Sharif Mehedi about #4507 (Points of sale (delivery notes and monthly invoicing)) (1 reply) : I wrote some stuff on sales.models. But I am at a loss, on how it is behaving and how it should. I published my local changes in gitlab. I think @luc and I should have a look at it together.
  • 4 aastat, 4 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : Sharif and I are still trying to understand what to do write in the get_wanted_movements() method (or probably rather get_payable_sums_dict()). We had a common session where I wrote a collection of use cases: [url luc.lino-framework.org/blog/2022/0618.html]
  • 4 aastat, 4 kuud ago by Sharif Mehedi about #4507 (Points of sale (delivery notes and monthly invoicing)) : Added package in cosi, lino_cosi.lib.users, to give the user the possibility to set a journal (IOW, point of sale). This package has only one important line of code in it, which is, in the UserDetail it adds a layout item sales_journal.
  • 4 aastat, 4 kuud ago by Sharif Mehedi about #4507 (Points of sale (delivery notes and monthly invoicing)) : I was thinking every subclass of Voucher intuitively should inherit from Payable, and currently they does. And we should NOT make CashPayable a subclass of PartnerRelated and replicate the features that are in Payable, justification for this is as such, since, a Voucher inherits from Payable, and we...
  • 4 aastat, 4 kuud ago by Sharif Mehedi in reply to Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : we already have a checkbox in the Journals.detail for `make_ledger_movements` and the gui_label for it is `Ledger`.
  • 4 aastat, 4 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : On the payment method, we don't need a checkbox. We just need the account to which any cash should be book. If this field is empty (e.g. for "send invoice"), then the sales note makes no ledger movements.
  • 4 aastat, 4 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : So there are multiple conditions. If Journal.make_ledger_movements is false, no mvts. If it is true, but the payment method says no: no movements either.
  • 4 aastat, 4 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) (1 reply) : I meanwhile think that we need both a checkbox on the journal and a field per payment method. Also a place to select the account to book in case of immediate cash payment. In such a case there would be no invoice and the sales note should directly create two ledger movements (one mvt credits the tur...
  • 4 aastat, 4 kuud ago by Sharif Mehedi about #4507 (Points of sale (delivery notes and monthly invoicing)) : @luc , I'd like to have a little discussion about how to implement the feature mentioned in my previous comment, when you can manage some time.
  • 4 aastat, 4 kuud ago by Sharif Mehedi about #4507 (Points of sale (delivery notes and monthly invoicing)) : My new cosi5 client is asking to get a new feature, as he describes it, a delivery note has total to pay, and when someone pays some amount less then the total to pay then the amount should be deducted from total to pay, aslo have the remaining amount should be added to the next delivery note, whene...
  • 4 aastat, 4 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : inject_field(User, "sales_journal")
  • 4 aastat, 4 kuud ago by Sharif Mehedi in reply to Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : Let me know when you are available.
  • 4 aastat, 4 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) (1 reply) : But i am sceptical whether this is needed. Let's talk.
  • 4 aastat, 4 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : Don't directly make a browser cookie, but just store a key in the session. Django stores the session itself, either using cookies or other mechanisms.
  • 4 aastat, 4 kuud ago by Sharif Mehedi about #4507 (Points of sale (delivery notes and monthly invoicing)) : how to manage point_of_sale? I am thinking of using browser cookie. For example, when a user Sign In we can look for the browser cookie (if already set with a key 'point_of_sale') to get the point of sale, if there are no point_of_sale browser cookie then lino must create a new PointOfSale and set t...
  • 4 aastat, 5 kuud ago by Luc Saffre in reply to Sharif Mehedi about #4507 (Points of sale (delivery notes and monthly invoicing)) : This won't be an ShowInsert action, but a normal action that ends with a goto_insance() call. And an inject_field() call to add a field User.sales_journal. NB the "Miscellaneous" partner field gets injected to SiteConfig, not to User. But what if two miscelleneous clients are being handled on two di...
  • 4 aastat, 5 kuud ago by Luc Saffre in reply to Sharif Mehedi about #4507 (Points of sale (delivery notes and monthly invoicing)) : Either in sales.VatProductInvoice. Or rather in a separate model mixin "ledger.mixins.CashPayable", which at the moment is used only by sales.VatProductInvoice.
  • 4 aastat, 5 kuud ago by Sharif Mehedi about #4507 (Points of sale (delivery notes and monthly invoicing)) (1 reply) : Another question about "cash_received", "cash_to_return" fields, should they be in sales.VatProductInvoice?
  • 4 aastat, 5 kuud ago by Sharif Mehedi about #4507 (Points of sale (delivery notes and monthly invoicing)) (1 reply) : Adding a [start new sale] quick link, which should create a Voucher without asking any question (NO input params), where should I get the defaults from? And what are the defaults?
  • 4 aastat, 5 kuud ago by Sharif Mehedi in reply to Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : I put the translations for the new translatables
  • 4 aastat, 5 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : Sharif, see [url luc.lino-framework.org/blog/2022/0512.html my blog] for our list of ideas regarding what can be optimized.
  • 4 aastat, 5 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : I adapted the test suite after my yesterday's changes and restored the print_items_table feature (but now as a plugin setting) which I had removed yesterday as a side effect of having converting the models.py of sales to use a separate ui.py module.
  • 4 aastat, 5 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : After my changes, the line "Loading data from /home/luc/work/xl/lino_xl/lib/invoicing/fixtures/demo_bookings.py" takes considerable time in cosi5. I suspect it to waste resources by doing useless things.This is where all delivery notes are being invoiced. The result seems correct, I just wonder why ...
  • 4 aastat, 5 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : Sharif and I had a brainstorming regarding the next things to do.
  • 4 aastat, 5 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : I committed my work. Sharif, when you have time, please have a look at docs/specs/cosi5/index.rst. And the other failing test regarding VAT numbers: let's talk about this.
  • 4 aastat, 5 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) (1 reply) : Sharif, I will leave docs/specs/cosi5/index.rst for you, you will have easier to adapt the menu there. And maybe you can also translate several new menu items that aren't yet translated. I plan to commit my work soon.
  • 4 aastat, 5 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : I'll adapt the trivial changes in the test suite now. Routine work...
  • 4 aastat, 5 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : Great: the book test suite now has only trivial failures. Which means that we have what we wanted to show to a small shop owner and we did not need any big change (as I started to imagine last week, with a new type of movement table similar to the VNA.DBF in TIM)
  • 4 aastat, 5 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : I fixed the problem detected by docs/specs/voga/sales.rst and manually tested partial invoicing in cosi5. I added a new checkbox ledger.Journal.make_ledger_movements (delivery notes are currently exactly as invoices except that they don't generate any ledger movements). And when the plugin option in...
  • 4 aastat, 5 kuud ago by Luc Saffre in reply to Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : It's because when working in invoicings/mixins.py I didn't differentiate between "asset_to_buy" and "invoiceable_qty".
  • 4 aastat, 5 kuud ago by Luc Saffre in reply to Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : Jacqueline is enrolled in the journey "Greece 2015" with 2 places (590€), but the invoice says 4 places. The invoiced quantity is duplicated.
  • 4 aastat, 5 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) (2 replies) : I stashed my work, ran pm prep in roger, adapted the doctest in docs/specs/voga/sales.rst so that it uses no ellipsis (shows all invoices), then popped my stash, reran pm prep in roger and ran the doctest again. Now I can see which invoice had changed:
       - 11/2014              01/01/2014  Jacobs Ja...
  • 4 aastat, 5 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : doctest docs/specs/voga/sales.rst shows a difference in roger (voga) in InvoicesByJournal after my changes: same number of sales invoices, and those I had in the tested document (I had removed most invoices and replaced them by elipses) are the same. But one of them must be different because the tot...
  • 4 aastat, 5 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : The last issue was because InvoicingInfo.__init__() (which is so to say the heart of Lino's invoicing algorithm) simply didn't yet support this use case of partial invoicings. Fixing it was a heart surgery: I should now run the complete test suite because i expect unexpected side effects.
  • 4 aastat, 5 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : There is at least one more issue: deliver 100 chairs, then writen an invoice for 30 of them, then start another invoicing plan: Lino fails to suggest the remaining 70 chairs.
  • 4 aastat, 5 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : Yesterday evening I came to a point where I was about to add a new voucher type "service reports" and to generate these reports before generating the invoices... Now I stashed all my changes and returned back to my initial idea (have InvoiceItem inherit from InvoiceGenerator), then added a demo jour...
  • 4 aastat, 5 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : I am deeply in a big change of the invoicing plugin. sales and ledger plugins will also receive minor changes. Still too early to talk about it.
  • 4 aastat, 5 kuud ago by Luc Saffre about #4507 (Points of sale (delivery notes and monthly invoicing)) : This was born out of #4503, but it is much more than just a little new feature in Cosi. It will cause substantial changes also in Voga, Tera and Presto.