Shoplex takes Shopware online shop order and invoice data and converts it in a format that Lexware can read to model open positions.
It superseedes the magelex (version online is outdated), since the change from Monstergento to Shopliftware.
It supports the management of cash flow in Lexware.
The solution is specific for one customers needs. If you need a similar (or better) solution, contact us!
It is hacked in pretty vanilla (and as of writing, recent) Ruby 3.2.1+ and comes with a sinatra (old school, single fileish) web interface.
Install it yourself as:
$ gem install shoplex
Instructions to run the web-ui are below.
Customer accounts are hard coded.
$ none yet
- export order data from shopware to file
- run the script or start the webui and upload
- shoplex will scale the shipping cost and add it to the tax amounts
- shoplex will output an ISO_8859_1 encoded file
- import file in lexware
How to deal with credits/Gutschriften
We don't know yet
Does EU-ity depend on shipping or billing address
We don't know yet
Some invoices have 0 amount and/or a gutschrift - where do they come from?
We don't know yet
Where is the tax of the shipping costs?
The invoiceAmount is inclusive the invoiceShipping. Taxes of the shipping is not included in the individual tax columns but calculated via percentage (anteilsmäßig).
Which invoices or orders to take into account?
Take all invoices (irrespective of orderStatus and paymentStatus)
Does Lexware needs gross or net numbers?
Lexware takes gross numbers
Do we need to book the discount?
No.
We cannot reconstruct the gross values from the net values, what do we do?
We round up.
Which date to take?
Date of Invoice
Which country to take?
Shipping (not billing)
To experiment with that code, run bin/console
for an interactive prompt.
Tests are implemented with minitest. Run guard
for continuous test runs.
Bug reports and pull requests are welcome on GitHub at https://github.com/raw-living-germany/shoplex. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
The included pico css file is MIT licensed. Rest is AGPLv3+, Copyright 2023 Felix wolfsteller.
Everyone interacting in the Shoplex project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
(single file sinatra app)
bundle exec exe/shoplex-web
Execute
bundle exec rerun --pattern "**/*" --ignore="test/*" exe/shoplex-web
for automatic server reloads in development.
As a service you can take the template in [webui/shoplex.service], link it (e.g.
ln -s /home/rawbotz/shoplex/webui/shoplex.service /etc/systemd/system/shoplex.service
) and
start it (service shoplex restart
)
A nginx snippet for SSL termination is included.
Initialyy it was thought that ShopwareInvoice
and Booking
can be rather
immutable representations. Even thought using Rubys (as of writing) new Data
for it. As it turns out, input data is always dirty. A health issue led me
to write half of the code with my left hand only.