-
-
Notifications
You must be signed in to change notification settings - Fork 725
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
[Spree Upgrade][Account Invoices] Handle shipping_method_id on finalize_account_invoices #2684
Comments
I went through all classes relates to account_invoices to verify uses of shipping_method_id. The only change that needs to be done here is where this shipping_method_id is used in app/jobs/finalize_account_invoices.rb:43 The respective spec (spec/jobs/finalize_account_invoices_spec.rb) is broken probably because of this. |
The challenge of replacing I see two options:
@mkllnk @sauloperez do you guys know this code? any ideas how we can go through or around the order.create_proposed_shipments flow? |
No idea. I would need to dig in the code for a while to give you a proper answer. |
ok, thanks @mkllnk My preferred approach here would be to create a variant like "OFN Usage" and make these orders totally normal. I think that is easy to do and it will work, but I need confirmation from someone who knows this code. |
I know nothing about this code, but I do remember I once wondered what was actually about and @oeoeaio knew. Not sure if he was the author. |
ok, thanks guys. I am tempted to get rid of the logic "these are invoices and not normal orders" and make these normal orders in the system with product, variant and line items. The "OFN usage" product. Anyway, I'll leave this for later as it's not blocking any other part of the upgrade. @oeoeaio if you ever come here, please advise :-) |
I think we need to ask at least @kirstenalarsen before we can get rid of this logic. We were charging people for using OFN, but we are in the process of reviewing our business model at the moment. The UK is charging as well, I think. I just don't know what reporting they use for that. @Matt-Yorkley? I think that the OFN should provide the reports to base invoices on. But the actual charging logic is very coupled to the local business model and should probably sit outside OFN. |
I didnt mean to get rid of this part of OFN! I just meant to get rid of the specific part of the solution which makes these a special order without line items. |
Okay, if you can change the logic without breaking anything, go ahead. :-) |
ok, this is ready for dev. As mentioned above, whoever takes a chance on this issue can:
I thought option 1 was difficult but now I think option 1 will be so easy it will not be worth considering option 2. |
Looking at this again, the simple option 1 is made more dificult by this commit |
We need to review/replace usage of shipping_method_id in app/jobs/finalize_account_invoices.rb
Files that reference shipping_method_id:
The text was updated successfully, but these errors were encountered: