Forum Replies Created
-
AuthorPosts
-
ppmt
ParticipantThanks for the explanation. I don’t think it will apply to my customers as they tend to pay the right amount but you never know…it might comes in handy in the future.
Well I think my problem is now sorted. I am not sure why I could not install it myself which is annoying but it is what it is.
Thanks a lot for your help.
Next job is now to reproduce my invoice format. It seems that I can’t reuse my templates as it and will need to tweak it.
ppmt
ParticipantThank you so much!!! It turns out I needed to also install php-intl as well !
But I am not out of the wood yet.
I can now add an invoice but when I save it I get the following error
Fatal error: Uncaught TypeError: Inc\Claz\PaymentWarehouse::getOne(): Argument #1 ($id) must be of type string|int, null given, called in /var/www/html/simpleinvoices-master_2023/Inc/Claz/Invoice.php on line 398 and defined in /var/www/html/simpleinvoices-master_2023/Inc/Claz/PaymentWarehouse.php:21 Stack trace: #0 /var/www/html/simpleinvoices-master_2023/Inc/Claz/Invoice.php(398): Inc\Claz\PaymentWarehouse::getOne() #1 /var/www/html/simpleinvoices-master_2023/Inc/Claz/Invoice.php(47): Inc\Claz\Invoice::getInvoices() #2 /var/www/html/simpleinvoices-master_2023/modules/invoices/quickView.php(36): Inc\Claz\Invoice::getOne() #3 /var/www/html/simpleinvoices-master_2023/index.php(441): include('...') #4 {main} thrown in /var/www/html/simpleinvoices-master_2023/Inc/Claz/PaymentWarehouse.php on line 21
Not sure what paymentwarehouse are but I added one and now the new invoice I created after is working.
will need to read on paymentwarehouse.
ppmt
ParticipantThanks for the file. I installed it abut I am starting to think my install is cursed.
Here is the error message I get now 🙁
Fatal error: Uncaught Error: Class "NumberFormatter" not found in /var/www/html/simpleinvoices-master_2023/Inc/Claz/Taxes.php:123 Stack trace: #0 /var/www/html/simpleinvoices-master_2023/Inc/Claz/Taxes.php(30): Inc\Claz\Taxes::getTaxes() #1 /var/www/html/simpleinvoices-master_2023/modules/index/index.php(24): Inc\Claz\Taxes::getAll() #2 /var/www/html/simpleinvoices-master_2023/index.php(441): include('...') #3 {main} thrown in /var/www/html/simpleinvoices-master_2023/Inc/Claz/Taxes.php on line 123
ppmt
ParticipantOk so I did a fresh install with an empty database and since it is a test server I also installed the sample data.
As soon as I did that I got the same PDO error:Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 2014 Cannot execute queries while there are pending result sets. Consider unsetting the previous PDOStatement or calling PDOStatement::closeCursor() in /var/www/html/simpleinvoices-master_2023/Inc/Claz/PdoDb.php:713 Stack trace: #0 /var/www/html/simpleinvoices-master_2023/Inc/Claz/PdoDb.php(713): PDOStatement->execute() #1 /var/www/html/simpleinvoices-master_2023/Inc/Claz/PdoDb.php(1310): Inc\Claz\PdoDb->lastInsertId() #2 /var/www/html/simpleinvoices-master_2023/modules/install/sample_data.php(20): Inc\Claz\PdoDb->query() #3 /var/www/html/simpleinvoices-master_2023/index.php(441): include('...') #4 {main} thrown in /var/www/html/simpleinvoices-master_2023/Inc/Claz/PdoDb.php on line 713
I have attached a zip file containing the php.log and the si.log.
I hope it will help youAttachments:
ppmt
ParticipantSorry for the late answer.
I did try to start from scratch. I installed the latest software and created an empty database and let the install do its job but for me it doesn’t work. Each time I try to create an invoice it fails when I try to save it.
I am not sure why it is not working for me.
At this stage I would like to install a brand new “virgin” version of SI but I can’t
ppmt
ParticipantAgain thanks for your time.
I did install the Essential Data. I actually think you can’t move forward without doing it.
So if I understand you well it is not possible to install the Master2023 as a new install? and instead I must upgrade from 2019.2?
I so I will try to install 2019.2 from scratch and then update it to the Master2023.
The issue with my existing install is that it is very old.
version.update_date = 20181012 version.name
I have never been able to find a successful upgrade path and sort of gave up.
I am not too bothered about porting the database over and don’t mind starting from fresh.
Of course if you think you can upgrade it and you don’t mind spending the time doing it I can send you the files.
ppmt
ParticipantThank you for the reply.
I am using PHP version 8.1.31 . The database is MariaDB version 10
It is installed on a Debian 12 with Apache2 as the server.I am installing a version from scratch so no upgrade. I tried to update in the past and I never got it to work.
So here is what I did.
1/ I created a new database and updated the custom.config.ini with the correct credentials
2/ I opened the website and it ask me to confirm to install the database.
3/ Then it asked me to install the essential data
4/ I declined to install the sample data and instead created a biller, a customer and a few products.All seemed good so I created an invoice. When I pressed saved I got the message above.
I also tried to do it again after emptying the database and this time installing the sample data. It gave me the same error while it was doing that.
The php.log attached is from a fresh install.
After installing the sample data I got this error:
Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 2014 Cannot execute queries while there are pending result sets. Consider unsetting the previous PDOStatement or calling PDOStatement::closeCursor() in /var/www/html/simpleinvoices-master_2023/Inc/Claz/PdoDb.php:713 Stack trace: #0 /var/www/html/simpleinvoices-master_2023/Inc/Claz/PdoDb.php(713): PDOStatement->execute() #1 /var/www/html/simpleinvoices-master_2023/Inc/Claz/PdoDb.php(1310): Inc\Claz\PdoDb->lastInsertId() #2 /var/www/html/simpleinvoices-master_2023/modules/install/sample_data.php(20): Inc\Claz\PdoDb->query() #3 /var/www/html/simpleinvoices-master_2023/index.php(441): include('...') #4 {main} thrown in /var/www/html/simpleinvoices-master_2023/Inc/Claz/PdoDb.php on line 713
This was the url listed in the browser at the time:
http://192.168.0.140/simpleinvoices-master_2023/index.php?module=install&view=sample_data
Hopefully this will be useful for you
Attachments:
ppmt
ParticipantI tried as well by installing the sample data and the issue is the same.
Question: Am I meant to be using that version?
ppmt
ParticipantI would be interested to see what you can do as well.
This is basically what is stopping me from upgrading to the latest version at the moment. I tried to rewrite my template but it is just not as good as it was!
ppmt
ParticipantHi Richards,
Thanks for your help and patience.
I didn’t have the latest version from the github which contains the new code for the function. After I downloaded it I can report that theprint_if_not_empty
function is now working as intended.I now just have a few tweaks to do in my template and I will be able to switch to the master_2020 version on my production machine.
ppmt
ParticipantGood news!
It turns out I was not quite up to date with github. I couldn’t find the $class2 your were talking about.
So I downloaded the latest version and now it works. If I use print_if_not_empty then it now works.ppmt
ParticipantHi,
Sorry for the delay been away.I cleared my plugins directory and deleted everything in tmp and the problem remains.
I can wait for your next update and hopefully something will change.It must be something with my setting or my database then because I have the same issue when I use the other templates provided by default.
ppmt
ParticipantOk so may be I am missing something but it doesn’t seem to work for me. Here is an extract of an invoice. As you can see the field phone, fax, mobile and email are empty but the field is still displayed.
Here is the code I am using in my template:
{print_if_not_empty label=$LANG.phoneShort field=$customer.phone class1='' class2='' colspan="3"} {print_if_not_empty label=$LANG.fax field=$customer.fax class1='' class2='' colspan="3"} {print_if_not_empty label=$LANG.mobileShort field=$customer.mobile_phone class1='' class2='' colspan="3"} {print_if_not_empty label=$LANG.email field=$customer.email class1='' class2='' colspan="3"}
I have tried with print_if_not_null as well and the result is the same.
Attachments:
ppmt
ParticipantOk so
!empty
does fix the problem I have withisset
. ThanksHow about the
print_if_not_null
function? I found that there isprint_if_not_empty
but looking at the code it is actually the same as print_if_not_null.
I guess I will copy that function, put it in my theme plugins and replace isset by !emptyIs there any reason why the “empty” field are not set to NULL when not populated? The talbe definition seems to indicate that the defaul should be NULL
ppmt
ParticipantIf you are using the latest master-2020 version then updating PHP to 7.4 is a requirement and might solve your issue
-
AuthorPosts
Recent Comments