When on an order page, the 'Create an invoice' button shows an empty page with this error:
Notice: Trying to get property of non-object in erpal_reports_create_money_output() (line 80 of /home/office/public_html/profiles/erpal_platform/modules/erpal/erpal_reports/erpal_reports.rules.inc).
and
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'field_output_unit_target_id' cannot be null: INSERT INTO {field_data_field_output_unit} (entity_type, entity_id, revision_id, bundle, delta, language, field_output_unit_value, field_output_unit_target_id) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7); Array ( [:db_insert_placeholder_0] => erpal_output [:db_insert_placeholder_1] => 1 [:db_insert_placeholder_2] => 1 [:db_insert_placeholder_3] => revenue [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => und [:db_insert_placeholder_6] => 184.5 [:db_insert_placeholder_7] => ) in field_sql_storage_field_storage_write() (line 514 of /home/office/public_html/modules/field/modules/field_sql_storage/field_sql_storage.module).
Comments
Comment #2
choy commentedI cannot reproduce your error on my erpal platform installations.
Please have a look at your configuration. Your error don't seemed to be linked to erpal platform
Comment #3
Yuri commentedWhat configuration to you suggest I check?
And this is a clean install of the latest dev version of ERPAL Platform. Nothing added or removed to the installation.
Comment #4
choy commentedyou say you are at the url */invoice/add&destination=invoices
then you hit a button with the url *//admin/commerce/orders/add/commerce_order?render=references-dialog
a) this button doen't exist at the named url !
b) the url */admin/commerce/orders/add/commerce_order?render=references-dialog doesn't exist and isn't defined in the erpal platform default installation - only admin/commerce/orders/add/ but that url you won't get from the page */invoice/add&destination=invoices
with other words, I don't what and how you modified the default erpal platform installation, but you did it deeply wrong ! - Have a look at you dblog - maybe you'll find there an answer - but again I am 100% sure this mistake is yours and not a bug of the distribution
Comment #5
Yuri commentedNo, I did not add remove or change anything to the ERPAL clean installation.
Comment #6
choy commentedhere again - your error is not reproducable. Please check your installation! There is something wrong with.
Comment #7
andrewsizz commentedHey Yuri
Thanks for all your issues, I will check it tomorrow, and will try to fix or answer. Thanks for your time guys.
Comment #8
Yuri commentedComment #9
Yuri commentedComment #10
Yuri commentedComment #11
Yuri commentedComment #12
Yuri commented@ChoY I have reinstalled ERPAL Platform very carfully again, and the same error messages that I have posted today and yesterday are still appearing. So I'm quite sure that this is not an installation error of my side. Besides, I never had installation issues with my server using other Drupal distributions.
Comment #13
choy commentedTo me your error looks like that your database wasn't completely created during the installation.
A PDOExeption: SQLSTATE message is typical for a missing or a wrong configured table in a database.
Attached I send you my screenshots when oping a quote an hitting the button create an "invoice"
The following message in green should look like mine (see second screenshot)
So to me there is definitely a mistake in your installation!
How do yo install the distribution? Do you get any error message during installation or afterwards?
Have you ever tried to run a cache clear? Dp you work with drush - what happens when you run $: drush cc all ?
Comment #14
Harsikesa commentedHi,
I can reproduce the issue. It is caused by missing measure unit. The trigger is, when you install erpal you choose different currency than the default currency available (Dollar & Euro or usd, eur). The solution is add your current currency via this link: /admin/structure/units-measure/money/units-unit
Click on the add unit measurement link, and make the machine name your currency code.
Hope this help.
Comment #16
andrewsizz commentedThanks Guys a lot, yes issue really was that we don't have units for all other currencies, added code which will create automatically unit for selected currency on installation
Comment #17
andrewsizz commentedand yes, Harsikesa totally right, you also can add new unit on /admin/structure/units-measure/money/units-unit
Comment #18
Yuri commentedCorrect I used another currency when installing. Adding the currency (and resaving any existing orders with the new currency) worked without the need to reinstall ERPAL Platform. Thanks guys, great work!