Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
d93a7b7
feat(avancement): File card updated, resolved conflit in 19.0
Amael-PE Jan 3, 2025
d36fcd4
feat(avancement): Complete new method in class Facture + basic transl…
Amael-PE Jan 3, 2025
1a43c95
FIX Remove useless lang entry
Amael-PE Jan 3, 2025
a5ed720
FIX Correcting a typo and changing translation key
Amael-PE Jan 3, 2025
f6263b5
Merge pull request #2 from francoisPE/19_avancement
Amael-PE Jan 3, 2025
63f921e
NEW Template devis couffignal (#3)
Amael-PE Jan 3, 2025
01005a0
NEW import_lines_from_object for invocies now is wrapped in subtitles
Amael-PE Jan 3, 2025
07727d8
NEW new invoice suggest to merge new project orders
Amael-PE Jan 3, 2025
bbfc698
NEW import_lines_from_object for invocies now is wrapped in subtitles…
Amael-PE Jan 3, 2025
78bdfa2
NEW Add commande on new situation invoice (#6)
francoisPE Jan 3, 2025
71ef6a7
FIX Change the computation method for progress table in invoice card.…
Amael-PE Jan 4, 2025
b5c0a89
Merge branch 'add_commande_on_new_situation_invoice' into 19.1
Amael-PE Jan 4, 2025
4df652f
Fix bg fact fourn as started in https://github.com/Dolibarr/dolibarr/…
Amael-PE Jan 8, 2025
639557f
NEW Custom pdf models (#8)
Amael-PE Jan 8, 2025
ac8dc24
NEW Templates supplier invoice sansprix, avecprix & productwithdrawal…
Amael-PE Jan 9, 2025
bd813b0
Merge 19.0 in 19.1 (#11)
francoisPE Jan 12, 2025
af98509
Fix pdf_couffignal_situation.modules.php
francoisPE Jan 12, 2025
349ec53
FIX pdf_couffignal_situation.modules.php
francoisPE Jan 12, 2025
3b2578b
FIX pdf_couffignal_situation.modules.php
francoisPE Jan 12, 2025
6f82dd6
FIX/FEAT Model pdf commande fournisseur display author and author mob…
Amael-PE Jan 15, 2025
379bee7
FIX Pdf models for Facture (#13)
Amael-PE Jan 15, 2025
6e828d8
Merge branch '19.1' of https://github.com/francoisPE/dolibarr into 19.1
Amael-PE Jan 15, 2025
da573f2
NEW Feature enabling Prorata charges (#12)
Amael-PE Jan 15, 2025
b0cb0d5
FIX Properly account for VAT in accounting for prorata
Amael-PE Jan 15, 2025
e49df3d
NEW Introduce a proper management of prorata (incl. TVA) in Facture's…
Amael-PE Jan 15, 2025
681268e
FIX Code Styling
Amael-PE Jan 15, 2025
5a71597
FIX Styling and header issues in pdf Facture
Amael-PE Jan 15, 2025
6337b19
FIX Bug that prevented FactureFournisseur creation
Amael-PE Jan 15, 2025
3b56d4b
Fix pdf models (#15)
Amael-PE Jan 18, 2025
f648a0b
NEW Feature endline on Client invoices (#36)
Amael-PE Jan 19, 2025
efafb33
FIX Inconsistencies in variables passing in Facture PDF
Amael-PE Jan 20, 2025
c4a6881
FIX PDF Facture model to support tableauBTP on 1st situation invoice
Amael-PE Jan 20, 2025
2263fde
FIX PDF Model Incorrect management when incoice is first in situation…
Amael-PE Jan 20, 2025
62b1660
FEAT Model sponge PDF for invoices supporting Subtotal module
Amael-PE Jan 22, 2025
6d1ab8b
FIX Model Sponge_subtotal
Amael-PE Jan 22, 2025
107905d
FIX - UNIT ALWAYS DISPLAYED ON LINE CREATION (#60)
francoisPE Feb 1, 2025
8273dba
Fix Template Facture rounding (#87)
Amael-PE Feb 23, 2025
354c08f
FIX Specialcode lines grouping by product id (#88)
Amael-PE Feb 23, 2025
ea9c877
FIX Rounding error
Amael-PE Feb 23, 2025
b114b51
Fix Rounding in facture template
Amael-PE Feb 23, 2025
dfd7dff
CHANGE: Permissions for note editing - facture/commande - right to va…
francoisPE Feb 25, 2025
2401057
Sticky css on template titles (#74)
francoisPE Feb 25, 2025
f6c5796
Give right to modify an expense report to approver (#73)
francoisPE Feb 25, 2025
77fac2a
FIX Blocking issue on customer invoices (#98)
Amael-PE Feb 28, 2025
0999db1
FEAT Auto nameing facture (#99)
Amael-PE Feb 28, 2025
46e4bad
FEAT Bring Pdf improvements for Situation invocies (#100)
Amael-PE Mar 1, 2025
aeca778
feat: config show input ttc for supplier order (#69) (#101)
Amael-PE Mar 1, 2025
d0f4ef4
CHANGE: allow to push a specific Unit for a predef product (#97)
francoisPE Mar 1, 2025
8d8295f
FIX Bug introduced by #92 Note not updating
Amael-PE Mar 9, 2025
5930a85
FIX PDF Template for Factures `couffignal_situation` rounding on firs…
Amael-PE Mar 14, 2025
c90d801
feat: show resume orders in pdf facture (#106)
floyoops Mar 26, 2025
c7a4ae0
CHANGE Improve Situation invoice lines calculation for prices in pdf.…
Amael-PE Mar 30, 2025
15c30c5
NEW Prorata & retained warranty management in Facture pdf 1st page (#…
Amael-PE Mar 30, 2025
b0bb4d9
FIX Factures pdf display (#109)
Amael-PE Mar 30, 2025
34e86ae
FIX Problems in the total_ttc and blocking errors in custom Facture P…
Amael-PE Apr 3, 2025
3c09f10
feat: Enhance invoice validation by calculating order price (#111)
floyoops Apr 25, 2025
cf8bc4d
feat: apply specialCodeAuto of product to propal/command/facture clie…
floyoops May 11, 2025
589d193
CHGE list.php (#113)
francoisPE May 11, 2025
e3824ca
feat(Deposit): Display nicely Supplier Invoices-related desposits in …
Amael-PE May 17, 2025
d447237
feat(LinkToFilter): Enable to filter LinktTo block on project (#115)
Amael-PE May 18, 2025
53e24f9
fix(PDF): Fix error on situation invoices pdf for VAT calculation on …
Amael-PE May 18, 2025
4d66304
feat(filter): On Propal list.php, add "open or signed" filter (#116)
Amael-PE May 18, 2025
a4aad9b
Merge branch '19.1' of https://github.com/francoisPE/dolibarr into 19.1
Amael-PE May 18, 2025
51aa905
NEW Filter on project for creation of next situation (#117)
Amael-PE May 18, 2025
5345a16
Merge branch '19.1' of https://github.com/francoisPE/dolibarr into 19.1
Amael-PE May 18, 2025
f7dc603
FIX: Update pdf.lib.php
francoisPE May 20, 2025
37f188f
feat: show table "répartition co sous traitances" (#118)
floyoops May 20, 2025
2231daf
PATCH CORRECTION PREVIOUS PR (#119)
francoisPE May 20, 2025
ba0c664
fix(facture): validation bill situation (#120)
floyoops May 25, 2025
8f4ec41
fix(facture): Taking into account company on resume command (#122)
floyoops Jun 8, 2025
654a7bd
FEATURE:list.php (#121)
francoisPE Jun 8, 2025
f1ef37a
fix: table co sous traitant (#123)
floyoops Jun 21, 2025
84c2054
Fix tableau 2 (#124)
floyoops Jun 29, 2025
3c7e8c0
Merge branch '19.1' of https://github.com/francoisPE/dolibarr into 19.1
Amael-PE Sep 14, 2025
51ce9c6
Fix(Facture): Fix table recap in card.php to include prorata and spec…
Amael-PE Sep 14, 2025
5145b01
fix(pdf): Error in value presented in CoSousTratant Table, for Compan…
Amael-PE Sep 14, 2025
a4ee17c
Fix(card.php): Manage case where total_ttc = 0
Amael-PE Sep 20, 2025
6da5ac2
feat(lettering): Introduce a tolerance to the cents on lettering
Amael-PE Sep 20, 2025
40cda6d
fix(DivByZero) on facture/card.php
Amael-PE Sep 22, 2025
d03e17d
fix(fatcure/card.php): buigs introduced in previous commits
Amael-PE Sep 22, 2025
fd06aa0
Fix(Card.php) Remain to pay now include compensated debts
Amael-PE Sep 22, 2025
197cf30
fix(facture/card.php): enable Set Paid button to be back when invoice…
Amael-PE Sep 22, 2025
5af46fb
fix: Fix display of debt compensation from supplier invoices in Factu…
Amael-PE Jan 8, 2026
b5f93d6
Fix: Fix double substraction issue of debt compensation in facture/ca…
Amael-PE Jan 8, 2026
9dc0855
fix(pdf): In pdf Couffignal, fix last table spacing and accent issues
Amael-PE Jan 8, 2026
e8243f4
fix(facturecard): Fix missing class issue in Facture Card introduced …
Amael-PE Jan 8, 2026
648c125
Fix(pdf.lib.php): Fix PHP warning on pdf creation in core Dolibarr
Amael-PE Jan 9, 2026
5657e95
change(FactureSituation): CHange validation on OS vs Facture total € …
Amael-PE Jan 9, 2026
70703b0
WIP: Start fixing the pdf CoSousTraitant table
Amael-PE Jan 9, 2026
2326911
WIP: Fix CoSousTraitant table
Amael-PE Jan 11, 2026
abeb93d
fix: Fix display of debt compensation from supplier invoices in Factu…
Amael-PE Jan 8, 2026
3a7c29c
Fix: Fix double substraction issue of debt compensation in facture/ca…
Amael-PE Jan 8, 2026
fd1a3e0
fix(pdf): In pdf Couffignal, fix last table spacing and accent issues
Amael-PE Jan 8, 2026
f676527
fix(facturecard): Fix missing class issue in Facture Card introduced …
Amael-PE Jan 8, 2026
a9ed2de
Fix(pdf.lib.php): Fix PHP warning on pdf creation in core Dolibarr
Amael-PE Jan 9, 2026
449debe
change(FactureSituation): CHange validation on OS vs Facture total € …
Amael-PE Jan 9, 2026
512c813
WIP: Start fixing the pdf CoSousTraitant table
Amael-PE Jan 9, 2026
4d5b4ec
WIP: Fix CoSousTraitant table
Amael-PE Jan 11, 2026
d6c1e29
WIP: Update calculations on Co-Sous-trait for columns Marché and Fact…
Amael-PE Jan 19, 2026
7937b1d
feat(Tableau CoSousTraitant): Ready v1
Amael-PE Jan 19, 2026
d50081b
Merge branch '19.1' into fix_facture_card_and_pdf_display_issues
Amael-PE Jan 19, 2026
67656bd
Merge pull request #131 from francoisPE/fix_facture_card_and_pdf_disp…
Amael-PE Jan 19, 2026
600156d
Fix(error): Erro when Sous-traitant but no co-traitant or vice-versa.
Amael-PE Jan 19, 2026
f89d5e3
fix(error): Fix Error when only co-traitant or sous-traitant in pdf t…
Amael-PE Jan 19, 2026
c0776e3
fix(CoSousTraitant): Fix table CoSousTraitant Fatal error when no dir…
Amael-PE Jan 19, 2026
e12c002
Merge branch '19.1' into 19.0
Amael-PE Jan 19, 2026
f908af1
Merge branch '19.0' of https://github.com/francoisPE/dolibarr into 19.0
Amael-PE Jan 19, 2026
a94a8d7
Merge pull request #132 from francoisPE/19.0
Amael-PE Jan 19, 2026
3c7ce4c
Fix(pdf): micro change on style
Amael-PE Jan 19, 2026
80b45e7
Merge branch '19.1' of https://github.com/francoisPE/dolibarr into 19.1
Amael-PE Jan 19, 2026
4f93493
Feat(Table CoSousTraitant): Add special support for PROV invocies
Amael-PE Jan 19, 2026
620a8b6
Refacto(Facture/Card): Improve import performance
Amael-PE Jan 20, 2026
e1b9d28
Feat: Add Vizu with Graph and nodes in the `project/element.php` (#133)
Amael-PE Jan 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added doc/doctemplates/invoices/template_invoice.odt
Binary file not shown.
Binary file added doc/doctemplates/orders/template_order.odt
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 2 additions & 0 deletions doc/medias/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# File(s) into root medias directory are provide by Pixabay with Licence "CC0 Creative Commons"
# https://creativecommons.org/publicdomain/zero/1.0/
Binary file added doc/medias/background_coder.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/medias/background_dolibarr.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/medias/background_rough-horn.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/medias/background_sunset.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions htdocs/accountancy/admin/defaultaccounts.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@
if (getDolGlobalString('INVOICE_USE_RETAINED_WARRANTY')) {
$list_account[] = 'ACCOUNTING_ACCOUNT_CUSTOMER_RETAINED_WARRANTY';
}
if (getDolGlobalString('INVOICE_USE_PRORATA_DISCOUNT')) {
$list_account[] = 'ACCOUNTING_ACCOUNT_CUSTOMER_PRORATA_DISCOUNT';
}
if (isModEnabled('don')) {
$list_account[] = 'DONATION_ACCOUNTINGACCOUNT';
}
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/class/lettering.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ public function bookkeepingLettering($bookkeeping_ids, $unlettering = false)
}

// Check balance amount
if (!$group_error && !$unlettering && price2num($total) != 0) {
if (!$group_error && !$unlettering && price2num($total) < 0.01) {
$this->errors[] = $langs->trans('AccountancyErrorMismatchBalanceAmount', $total);
$group_error++;
}
Expand Down
128 changes: 123 additions & 5 deletions htdocs/accountancy/journal/sellsjournal.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
$date_end = dol_get_last_day($pastmonthyear, $pastmonth, false);
}

$sql = "SELECT f.rowid, f.ref, f.type, f.situation_cycle_ref, f.datef as df, f.ref_client, f.date_lim_reglement as dlr, f.close_code, f.retained_warranty, f.revenuestamp,";
$sql = "SELECT f.rowid, f.ref, f.type, f.situation_cycle_ref, f.datef as df, f.ref_client, f.date_lim_reglement as dlr, f.close_code, f.retained_warranty, f.revenuestamp, f.prorata_discount, f.total_ht as fact_total_ht,";
$sql .= " fd.rowid as fdid, fd.description, fd.product_type, fd.total_ht, fd.total_tva, fd.total_localtax1, fd.total_localtax2, fd.tva_tx, fd.total_ttc, fd.situation_percent, fd.vat_src_code, fd.info_bits,";
$sql .= " s.rowid as socid, s.nom as name, s.code_client, s.code_fournisseur,";
if (getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) {
Expand Down Expand Up @@ -189,6 +189,7 @@
$tabtva = array();
$def_tva = array();
$tabwarranty = array();
$tabprorata = array();
$tabrevenuestamp = array();
$tabttc = array();
$tablocaltax1 = array();
Expand Down Expand Up @@ -263,6 +264,9 @@
}
}

// Manage prorata_rate for VAT
$prorata_rate = $obj->fact_total_ht <> 0 ? ($obj->prorata_discount / $obj->fact_total_ht) : 0;

$revenuestamp = (float) price2num($obj->revenuestamp, 'MT');

// Invoice lines
Expand Down Expand Up @@ -310,11 +314,19 @@
$total_ttc -= $retained_warranty;
}

// Move a part of the prorata discount/charge into the account for prorata charges
if (getDolGlobalString('INVOICE_USE_PRORATA_DISCOUNT') && $obj->prorata_discount > 0) {
$prorata_discount = $prorata_rate * $obj->total_ht * $situation_ratio;
$tabprorata[$obj->rowid][$compta_soc] += $prorata_discount;
$total_ttc -= $prorata_discount; // Remove ht value for prorata
$total_ttc -= ($obj->total_tva * $situation_ratio * $prorata_rate); // Remove VAT value corresponding to prorata
}

$tabttc[$obj->rowid][$compta_soc] += $total_ttc;
$tabht[$obj->rowid][$compta_prod] += $obj->total_ht * $situation_ratio;
$tva_npr = (($obj->info_bits & 1 == 1) ? 1 : 0);
if (!$tva_npr) { // We ignore line if VAT is a NPR
$tabtva[$obj->rowid][$compta_tva] += $obj->total_tva * $situation_ratio;
$tabtva[$obj->rowid][$compta_tva] += $obj->total_tva * $situation_ratio * (1 - $prorata_rate);
}
$tablocaltax1[$obj->rowid][$compta_localtax1] += $obj->total_localtax1 * $situation_ratio;
$tablocaltax2[$obj->rowid][$compta_localtax2] += $obj->total_localtax2 * $situation_ratio;
Expand Down Expand Up @@ -369,6 +381,18 @@

$errorforinvoice = array();

// Round prorata and TVA to cents
if (getDolGlobalString('ROUND_IN_ACCOUNTING')) {
$to_round = array(&$tabprorata, &$tabtva, &$tabht, &$tabttc);
foreach ($to_round as &$tab) {
foreach ($tab as $invoice => $accounts) {
foreach ($accounts as $label => $value) {
$tab[$invoice][$label] = round($value, 2);
}
}
}
}

/*
// Old way, 1 query for each invoice
// Loop on all invoices to detect lines without binded code (fk_code_ventilation <= 0)
Expand Down Expand Up @@ -426,14 +450,16 @@

$companystatic = new Societe($db);
$invoicestatic = new Facture($db);
$accountingaccountcustomer = new AccountingAccount($db);

$accountingaccountcustomer = new AccountingAccount($db);
$accountingaccountcustomer->fetch(null, getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER'), true);

$accountingaccountcustomerwarranty = new AccountingAccount($db);

$accountingaccountcustomerwarranty->fetch(null, getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER_RETAINED_WARRANTY'), true);

$accountingaccountcustomerprorata = new AccountingAccount($db);
$accountingaccountcustomerprorata->fetch(null, getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER_PRORATA_DISCOUNT'), true);

foreach ($tabfac as $key => $val) { // Loop on each invoice
$errorforline = 0;

Expand Down Expand Up @@ -586,6 +612,67 @@
}
}

// Prorata
if (!$errorforline && getDolGlobalString('INVOICE_USE_PRORATA_DISCOUNT') && isset($tabprorata[$key])) {
if (is_array($tabprorata[$key])) {
foreach ($tabprorata[$key] as $k => $mt) {
$bookkeeping = new BookKeeping($db);
$bookkeeping->doc_date = $val["date"];
$bookkeeping->date_lim_reglement = $val["datereg"];
$bookkeeping->doc_ref = $val["ref"];
$bookkeeping->date_creation = $now;
$bookkeeping->doc_type = 'customer_invoice';
$bookkeeping->fk_doc = $key;
$bookkeeping->fk_docdet = 0; // Useless, can be several lines that are source of this record to add
$bookkeeping->thirdparty_code = $companystatic->code_client;

if (getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER_USE_AUXILIARY_ON_DEPOSIT')) {
if ($k == getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT')) {
$bookkeeping->subledger_account = $tabcompany[$key]['code_compta'];
$bookkeeping->subledger_label = $tabcompany[$key]['name'];
} else {
$bookkeeping->subledger_account = '';
$bookkeeping->subledger_label = '';
}
} else {
$bookkeeping->subledger_account = '';
$bookkeeping->subledger_label = '';
}

$bookkeeping->numero_compte = getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER_PRORATA_DISCOUNT');
$bookkeeping->label_compte = $accountingaccountcustomerprorata->label;

$bookkeeping->label_operation = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("ProtataDiscountAccountancy");
$bookkeeping->montant = $mt;
$bookkeeping->sens = ($mt >= 0) ? 'D' : 'C';
$bookkeeping->debit = ($mt >= 0) ? $mt : 0;
$bookkeeping->credit = ($mt < 0) ? -$mt : 0;
$bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $langs->transnoentities($journal_label);
$bookkeeping->fk_user_author = $user->id;
$bookkeeping->entity = $conf->entity;

$totaldebit += $bookkeeping->debit;
$totalcredit += $bookkeeping->credit;

$result = $bookkeeping->create($user);
if ($result < 0) {
if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') { // Already exists
$error++;
$errorforline++;
$errorforinvoice[$key] = 'alreadyjournalized';
//setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->fk_doc.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
} else {
$error++;
$errorforline++;
$errorforinvoice[$key] = 'other';
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
}
}
}
}
}

// Product / Service
if (!$errorforline) {
foreach ($tabht[$key] as $k => $mt) {
Expand Down Expand Up @@ -1143,7 +1230,7 @@ function writebookkeeping() {
$i++;
continue;
}
if ($errorforinvoice[$key] == 'somelinesarenotbound') {
if (array_key_exists($key, $errorforinvoice) && $errorforinvoice[$key] == 'somelinesarenotbound') {
print '<tr class="oddeven">';
print "<!-- Some lines are not bound -->";
print "<td>".$date."</td>";
Expand Down Expand Up @@ -1228,6 +1315,37 @@ function writebookkeeping() {
$i++;
}

// Prorata
if (getDolGlobalString('INVOICE_USE_PRORATA_DISCOUNT') && isset($tabprorata[$key]) && is_array($tabprorata[$key])) {
foreach ($tabprorata[$key] as $k => $mt) {
print '<tr class="oddeven">';
print "<!-- Prorata discount -->";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
// Account
print "<td>";
$accountoshow = length_accountg(getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER_PRORATA_DISCOUNT'));
if (($accountoshow == "") || $accountoshow == 'NotDefined') {
print '<span class="error">' . $langs->trans("MainAccountForProrataNotDefined") . '</span>';
} else {
print $accountoshow;
}
print '</td>';
// Subledger account
print "<td>";
if (getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER_USE_AUXILIARY_ON_DEPOSIT')) {
if ($k == getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT')) {
print length_accounta($tabcompany[$key]['code_compta']);
}
}
print '</td>';
print "<td>" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("ProtataDiscountAccountancy") . "</td>";
print '<td class="right nowraponall amount">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print '<td class="right nowraponall amount">' . ($mt < 0 ? price(-$mt) : '') . "</td>";
print "</tr>";
}
}

// Product / Service
foreach ($tabht[$key] as $k => $mt) {
$accountingaccount = new AccountingAccount($db);
Expand Down
9 changes: 5 additions & 4 deletions htdocs/comm/propal/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
$contactid = GETPOST('contactid', 'int');
$projectid = GETPOST('projectid', 'int');
$rank = (GETPOST('rank', 'int') > 0) ? GETPOST('rank', 'int') : -1;
$same_project_filter = GETPOST('sameproject', 'string') == "on";

// PDF
$hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS') ? 1 : 0));
Expand Down Expand Up @@ -1270,7 +1271,7 @@
}

$type = $prod->type;
$fk_unit = $prod->fk_unit;
$fk_unit = (getDolGlobalInt('MAIN_EDIT_LINE_SET_UNIT_ON_EXISTING_PRODUCT') ? GETPOST('units', 'alpha') : $prod->fk_unit) ;
} else {
$pu_ht = price2num($price_ht, 'MU');
$pu_ttc = price2num($price_ttc, 'MU');
Expand Down Expand Up @@ -2224,7 +2225,7 @@
$title = $langs->trans('ProductsAndServices');
print load_fiche_titre($title);

print '<div class="div-table-responsive-no-min">';
print '<div class="div-table-responsive-no-min" style="overflow: initial !important;" >';
print '<table class="noborder centpercent">';

$objectsrc->printOriginLinesList();
Expand Down Expand Up @@ -2973,7 +2974,7 @@
include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php';
}

print '<div class="div-table-responsive-no-min">';
print '<div class="div-table-responsive-no-min" style="overflow: initial !important;" >';
if (!empty($object->lines) || ($object->statut == Propal::STATUS_DRAFT && $usercancreate && $action != 'selectlines' && $action != 'editline')) {
print '<table id="tablelines" class="noborder noshadow centpercent">';
}
Expand Down Expand Up @@ -3155,7 +3156,7 @@
print $formfile->showdocuments('propal', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang, '', $object);

// Show links to link elements
$linktoelem = $form->showLinkToObjectBlock($object, null, array('propal'));
$linktoelem = $form->showLinkToObjectBlock($object, null, array('propal'), $same_project_filter);

$compatibleImportElementsList = false;
if ($user->hasRight('propal', 'creer') && $object->statut == Propal::STATUS_DRAFT) {
Expand Down
9 changes: 5 additions & 4 deletions htdocs/commande/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
$origin = GETPOST('origin', 'alpha');
$originid = (GETPOST('originid', 'int') ? GETPOST('originid', 'int') : GETPOST('origin_id', 'int')); // For backward compatibility
$rank = (GETPOST('rank', 'int') > 0) ? GETPOST('rank', 'int') : -1;
$same_project_filter = GETPOST('sameproject', 'string') == "on";

// PDF
$hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : (getDolGlobalString('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS') ? 1 : 0));
Expand Down Expand Up @@ -970,7 +971,7 @@
}

$type = $prod->type;
$fk_unit = $prod->fk_unit;
$fk_unit = (getDolGlobalInt('MAIN_EDIT_LINE_SET_UNIT_ON_EXISTING_PRODUCT') ? GETPOST('units', 'alpha') : $prod->fk_unit) ;
} else {
$pu_ht = price2num($price_ht, 'MU');
$pu_ttc = price2num($price_ttc, 'MU');
Expand Down Expand Up @@ -2122,7 +2123,7 @@
$title = $langs->trans('ProductsAndServices');
print load_fiche_titre($title);

print '<div class="div-table-responsive-no-min">';
print '<div class="div-table-responsive-no-min" style="overflow: initial !important;" >';
print '<table class="noborder centpercent">';

$objectsrc->printOriginLinesList('', $selectedLines);
Expand Down Expand Up @@ -2870,7 +2871,7 @@
include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php';
}

print '<div class="div-table-responsive-no-min">';
print '<div class="div-table-responsive-no-min" style="overflow: initial !important;" >';
print '<table id="tablelines" class="noborder noshadow" width="100%">';

// Show object lines
Expand Down Expand Up @@ -3084,7 +3085,7 @@


// Show links to link elements
$linktoelem = $form->showLinkToObjectBlock($object, null, array('order'));
$linktoelem = $form->showLinkToObjectBlock($object, null, array('order'), $same_project_filter);

$compatibleImportElementsList = false;
if ($usercancreate
Expand Down
4 changes: 2 additions & 2 deletions htdocs/compta/facture/card-rec.php
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@
/*
* Invoice lines
*/
print '<div class="div-table-responsive-no-min">';
print '<div class="div-table-responsive-no-min" style="overflow: initial !important;" >';
print '<table id="tablelines" class="noborder noshadow centpercent">';

// Show object lines
Expand Down Expand Up @@ -1683,7 +1683,7 @@
include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php';
}

print '<div class="div-table-responsive-no-min">';
print '<div class="div-table-responsive-no-min" style="overflow: initial !important;" >';
print '<table id="tablelines" class="noborder noshadow centpercent">';
// Show object lines
if (!empty($object->lines)) {
Expand Down
Loading
Loading