Allow usage of a method param that is not part of the $obj from the sql request.
The issue I encontered is the usage of order's LibStatut method that required a $mode param that can't be fetched from the sql request obj.
This would be the code for the export declaration :
$this->export_special_array[$r] = array(
'orders.fk_statut'=> [
'rule' => 'compute',
'class' => 'Commande',
'classfile' => '/commande/class/commande.class.php',
'method' => 'LibStatut',
'method_params' => ['orders_fk_statut', 'orders_facture', '1'],
],
);
We can see that the first two params will come from the $obj, but the third one will be used for it's value (in this case '1').
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Fix expense report journal entries bind to user
WAS: expense report payments did not fill out $tabtb (credit) to associate with their $tabpay (debit). The case would always fall through to 'NotDefined' and require manual adjustment.
NEW: if a user is associated with the expense report, then that user will get an associated credit line ($tabtp) generated.
* allow grouping tax with actual cost for accounting
Provides the ability for taxes paid in expense reports (ER_JOURNAL_GROUP_TAX_WITH_LINES) or purchases (AC_JOURNAL_GROUP_TAX_WITH_LINES) to get grouped with the main expense/purchase line and associated with the accounting account for the item itself. This is in contrast to the default behavior designed around VAT which splits off any taxes paid into a separate accounting account for each type of tax.
* fixed out of date reference
fixed merge error
* fixed linting issues
whitespace around braces and if/else keywords
* Update bankjournal.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
When creating new membership subscriptions and choosing to create an invoice (for linked thirdparty), existing payment method information of the customer should be used.
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
# Qual: fix phpstan by removing useless test
!$error && $champdatefin && ($champdatefin > 0) has useless tests.
- $error is still 0.
- $champdatefin is also not 0 when it is >0
- By casting $champdatefin to int, we ensure that '' (error) is
converted to 0.