I've noticed that reports of Expenses-Income They generated from Dolibarr (Financial> Reports) Bills that have marked as "do not appearpaid". These bills are characterized by having no record of payment on our bank account. But is it logical that do not appear ?. In my case, I sign many bills as "paid"To simplify the registration process Dolibarr because I do not have an exhaustive control of the movement of my account because that account I have many personal movements that are alien to the movements of my company. For that reason, I do not do often action "payment issue"And use the option"classified as paid"Because I facilitates the task.
Clarified the concept, for those who are in my situation, I leave what I have modified to show me all the moves we have with suppliers. This does not affect customer invoices, since in these Dolibarr always forces you to "payment issue“.
The following modifications have tested the Dolibarr 3.6.
We need to modify the following files:
At index.php modified as follows:
For invoices from suppliers, we seek the block is commented as "Frais, fournisseurs factures."And we modify the ELSE follows:
$sql = "SELECT sum(f.total_ttc) as amount_ttc, date_format(f.datef,'%Y-%m') as dm"; $sql.= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; $sql.= " WHERE f.rowid > 0";
At clientfourn.php modified as follows:
For invoices from suppliers, we seek the block is commented as "suppliers invoices"And we modify the ELSE follows:
$sql = "SELECT s.nom, s.rowid as socid, sum(f.total_ttc) as amount_ttc"; $sql.= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s"; $sql.= " ON f.fk_soc = s.rowid"; $sql.= " WHERE f.rowid > 0 "; if (! empty($date_start) && ! empty($date_end)) $sql.= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'";
In both queries, we have used:
- total_ttc: Because the amount is zero field
- Datef: As invoice date in the absence of payment as such
Now you can view the report Expenses / Income completely.
Keep updated your ERP / CRM Dolibarr
- Upgrade your Dolibarr without complications or risks to the latest version.
- Keep your data safe. I perform backup before performing the process.
- all information is migrated without losing anything.
- Write me and I will give personalized quote (Contact)