forked from Wavyzz/dolibarr
Compare commits
34 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a692c73071 | ||
|
|
def8495513 | ||
|
|
b2fce5052f | ||
|
|
b1d57a6bd1 | ||
|
|
16904d12f8 | ||
|
|
1525b9c85e | ||
|
|
ffe07999cf | ||
|
|
24146d89c5 | ||
|
|
1dd2cc36e4 | ||
|
|
477d755bbc | ||
|
|
f85b53a4ca | ||
|
|
a6e01fe7b7 | ||
|
|
43c2336683 | ||
|
|
e1b919366e | ||
|
|
40e4a6959f | ||
|
|
e9869bb5da | ||
|
|
22995dae99 | ||
|
|
52ae202aff | ||
|
|
2ca2fe7f28 | ||
|
|
140310c508 | ||
|
|
64cf2513bd | ||
|
|
6c207f78d8 | ||
|
|
a3969c1d2c | ||
|
|
d9563ac0ed | ||
|
|
bea2f674f0 | ||
|
|
80494870c0 | ||
|
|
d25847602b | ||
|
|
283efbbffe | ||
|
|
2e430a71a3 | ||
|
|
faf2971ff7 | ||
|
|
acf5e30b30 | ||
|
|
76b5540124 | ||
|
|
8bb63c5963 | ||
|
|
f532f85d8c |
3
.github/changed-lines-count-labeler.yml
vendored
3
.github/changed-lines-count-labeler.yml
vendored
@@ -1,3 +0,0 @@
|
||||
# Add this tag for any changes for more than 1 line
|
||||
"Pending analysis of PR (maintenance team)":
|
||||
min: 1
|
||||
9
.github/workflows/exakat.yml
vendored
9
.github/workflows/exakat.yml
vendored
@@ -6,8 +6,7 @@ on:
|
||||
schedule:
|
||||
- cron: "0 20 1 * *"
|
||||
workflow_dispatch:
|
||||
branches:
|
||||
- develop
|
||||
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -22,7 +21,7 @@ jobs:
|
||||
- name: Exakat
|
||||
uses: docker://exakat/exakat-ga
|
||||
with:
|
||||
ignore_rules: 'Classes/UseInstanceof,Performances/PrePostIncrement,Functions/UndefinedFunctions,Functions/WrongNumberOfArguments,Functions/WrongTypeWithCall,Variables/UndefinedVariable,Classes/DontUnsetProperties,Classes/NonPpp,Classes/StaticMethodsCalledFromObject,Classes/UseClassOperator,Functions/UsesDefaultArguments,Php/NoClassInGlobal,Php/ShouldUseCoalesce,Php/WrongTypeForNativeFunction,Structures/AddZero,Structures/DropElseAfterReturn,Structures/IfWithSameConditions,Structures/MergeIfThen,Structures/NestedTernary,Structures/ElseIfElseif,Structures/ExitUsage,Structures/RepeatedPrint,Structures/RepeatedRegex,Structures/SameConditions,Structures/SwitchWithoutDefault,Structures/ShouldMakeTernary,Structures/UselessParenthesis,Structures/UseConstant'
|
||||
ignore_rules: 'Classes/UseInstanceof,Performances/PrePostIncrement,Functions/UndefinedFunctions,Functions/WrongNumberOfArguments,Functions/WrongTypeWithCall,Variables/UndefinedVariable,Classes/DontUnsetProperties,Classes/NonPpp,Classes/StaticMethodsCalledFromObject,Classes/UseClassOperator,Functions/UsesDefaultArguments,Php/NoClassInGlobal,Php/ShouldUseCoalesce,Php/WrongTypeForNativeFunction,Structures/AddZero,Structures/DropElseAfterReturn,Structures/IfWithSameConditions,Structures/MergeIfThen,Structures/NestedTernary,Structures/ElseIfElseif,Structures/ExitUsage,Structures/RepeatedPrint,Structures/RepeatedRegex,Structures/SameConditions,Structures/SwitchWithoutDefault,Structures/ShouldMakeTernary,Structures/UselessParenthesis,Structures/UseConstant'
|
||||
ignore_dirs: '/htdocs/includes/,/htdocs/install/doctemplates/,/build/,/dev/,/doc/,/scripts/,/test/'
|
||||
file_extensions: php
|
||||
project_reports: Perfile
|
||||
file_extensions: php
|
||||
project_reports: Perfile
|
||||
|
||||
28
.github/workflows/test.yaml
vendored
28
.github/workflows/test.yaml
vendored
@@ -1,28 +0,0 @@
|
||||
name: Test github actions
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
types: [opened, reopened, synchronize]
|
||||
push:
|
||||
|
||||
env:
|
||||
ENVGHT: ${{ secrets.GITHUB_TOKEN }}
|
||||
ENVGHU: ${{ github.token }}
|
||||
TEST_ACCESS_KEY: ${{ secrets.TEST_ACCESS_KEY }}
|
||||
TEST_VAR_REPO: ${{ vars.TEST_VAR_REPO }}
|
||||
ENVLOCAL: "varenvlocal"
|
||||
|
||||
jobs:
|
||||
testjob:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Log
|
||||
run: |
|
||||
echo "Run action by ${{ github.actor }}"
|
||||
echo "github.token=${{ github.token }}"
|
||||
echo "secrets.GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}"
|
||||
echo "GITHUB_EVENT_PATH=$GITHUB_EVENT_PATH"
|
||||
echo "repo-token: ${{secrets.GITHUB_TOKEN}}"
|
||||
echo "secret repository TEST_ACCESS_KEY: ${{secrets.TEST_ACCESS_KEY}}"
|
||||
echo "variable repository : ${{vars.TEST_VAR_REPO}}"
|
||||
echo "ENVLOCAL: ${{env.ENVLOCAL}}"
|
||||
@@ -225,7 +225,7 @@ if (getDolGlobalString('MEMBER_ENABLE_PUBLIC')) {
|
||||
print '<tr class="oddeven drag" id="trforcenature"><td>';
|
||||
print $langs->trans("ForceMemberNature");
|
||||
print '</td><td>';
|
||||
$forcenature = getDolGlobalInt('MEMBER_NEWFORM_FORCEMORPHY', 0);
|
||||
$forcenature = getDolGlobalString('MEMBER_NEWFORM_FORCEMORPHY'); // 'phy' or 'mor'
|
||||
print $form->selectarray("MEMBER_NEWFORM_FORCEMORPHY", $morphys, $forcenature, 1);
|
||||
print "</td></tr>\n";
|
||||
|
||||
|
||||
@@ -939,13 +939,12 @@ class Asset extends CommonObject
|
||||
}
|
||||
|
||||
// Delete old lines
|
||||
$sql = "DELETE " . MAIN_DB_PREFIX . "asset_depreciation FROM " . MAIN_DB_PREFIX . "asset_depreciation";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_bookkeeping as ab ON ab.doc_type = 'asset' AND ab.fk_docdet = " . MAIN_DB_PREFIX . "asset_depreciation.rowid";
|
||||
$sql .= " WHERE " . MAIN_DB_PREFIX . "asset_depreciation.fk_asset = " . (int) $this->id;
|
||||
$sql .= " AND " . MAIN_DB_PREFIX . "asset_depreciation.depreciation_mode = '" . $this->db->escape($mode_key) . "'";
|
||||
$sql .= " AND ab.fk_docdet IS NULL";
|
||||
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "asset_depreciation";
|
||||
$sql .= " WHERE fk_asset = " . (int) $this->id;
|
||||
$sql .= " AND depreciation_mode = '" . $this->db->escape($mode_key) . "'";
|
||||
$sql .= " AND NOT EXISTS (SELECT fk_docdet FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping WHERE doc_type = 'asset' AND fk_docdet = " . MAIN_DB_PREFIX . "asset_depreciation.rowid)";
|
||||
if ($last_depreciation_date !== "") {
|
||||
$sql .= " AND " . MAIN_DB_PREFIX . "asset_depreciation.ref != ''";
|
||||
$sql .= " AND ref <> ''";
|
||||
}
|
||||
$resql = $this->db->query($sql);
|
||||
if (!$resql) {
|
||||
|
||||
@@ -196,6 +196,7 @@ class CashControl extends CommonObject
|
||||
$sql .= ", cash";
|
||||
$sql .= ", cheque";
|
||||
$sql .= ", card";
|
||||
$sql .= ", fk_user_creat";
|
||||
$sql .= ") VALUES (";
|
||||
//$sql .= "'(PROV)', ";
|
||||
$sql .= ((int) $conf->entity);
|
||||
@@ -210,6 +211,7 @@ class CashControl extends CommonObject
|
||||
$sql .= ", ".price2num($this->cash, 'MT');
|
||||
$sql .= ", ".price2num($this->cheque, 'MT');
|
||||
$sql .= ", ".price2num($this->card, 'MT');
|
||||
$sql .= ", ".((int) $user->id);
|
||||
$sql .= ")";
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
@@ -1537,6 +1537,9 @@ if (empty($reshook)) {
|
||||
}
|
||||
|
||||
foreach ($TTotalByTva as $tva => &$total) {
|
||||
if (empty($amountdeposit[$tva])) {
|
||||
$amountdeposit[$tva] = 0;
|
||||
}
|
||||
$coef = $total / $srcobject->total_ttc; // Calc coef
|
||||
$am = $amount * $coef;
|
||||
$amount_ttc_diff += $am;
|
||||
@@ -1561,6 +1564,9 @@ if (empty($reshook)) {
|
||||
if ($qualified) {
|
||||
$totalamount += $lines[$i]->total_ht; // Fixme : is it not for the customer ? Shouldn't we take total_ttc ?
|
||||
$tva_tx = $lines[$i]->tva_tx;
|
||||
if (empty($amountdeposit[$tva_tx])) {
|
||||
$amountdeposit[$tva_tx] = 0;
|
||||
}
|
||||
$amountdeposit[$tva_tx] += ($lines[$i]->total_ht * $valuedeposit) / 100;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1147,6 +1147,7 @@ if (!$error && $massaction == 'generate_doc' && $permissiontoread) {
|
||||
$objecttmp = new $objectclass($db);
|
||||
$nbok = 0;
|
||||
foreach ($toselect as $toselectid) {
|
||||
$objecttmp->thirdparty = null; // Clear if another value was already set by fetch_thirdparty
|
||||
$result = $objecttmp->fetch($toselectid);
|
||||
if ($result > 0) {
|
||||
$outputlangs = $langs;
|
||||
@@ -1161,7 +1162,7 @@ if (!$error && $massaction == 'generate_doc' && $permissiontoread) {
|
||||
if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && isset($objecttmp->default_lang)) {
|
||||
$newlang = $objecttmp->default_lang; // for thirdparty
|
||||
}
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && empty($objecttmp->thirdparty)) { //load lang from thirdparty
|
||||
if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && empty($objecttmp->thirdparty)) { //load lang from thirdparty
|
||||
$objecttmp->fetch_thirdparty();
|
||||
$newlang = $objecttmp->thirdparty->default_lang; // for proposal, order, invoice, ...
|
||||
}
|
||||
|
||||
@@ -641,7 +641,7 @@ class FormMail extends Form
|
||||
|
||||
// Add also email aliases from the c_email_senderprofile table
|
||||
$sql = "SELECT rowid, label, email FROM ".$this->db->prefix()."c_email_senderprofile";
|
||||
$sql .= " WHERE active = 1 AND (private = 0 OR private = ".((int) $user->id).")";
|
||||
$sql .= " WHERE active = 1 AND (private = 0 OR private = ".((int) $user->id).") AND entity IN (".getEntity('c_email_senderprofile').")";
|
||||
$sql .= " ORDER BY position";
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
|
||||
@@ -424,7 +424,10 @@ class CommandeFournisseur extends CommonOrder
|
||||
|
||||
$this->ref = $obj->ref;
|
||||
$this->ref_supplier = $obj->ref_supplier;
|
||||
|
||||
$this->socid = $obj->fk_soc;
|
||||
$this->thirdparty = null; // Clear if another value was already set by fetch_thirdparty
|
||||
|
||||
$this->fourn_id = $obj->fk_soc;
|
||||
$this->statut = $obj->status; // deprecated
|
||||
$this->status = $obj->status;
|
||||
|
||||
@@ -990,6 +990,8 @@ class FactureFournisseur extends CommonInvoice
|
||||
|
||||
$this->socid = $obj->socid;
|
||||
|
||||
$this->thirdparty = null; // Clear if another value was already set by fetch_thirdparty
|
||||
|
||||
// Retrieve all extrafield
|
||||
// fetch optionals attributes and labels
|
||||
$this->fetch_optionals();
|
||||
|
||||
@@ -157,7 +157,7 @@ $year_month = sprintf("%04d", $search_year).'-'.sprintf("%02d", $search_month);
|
||||
$sql = "SELECT cp.rowid, cp.ref, cp.fk_user, cp.date_debut, cp.date_fin, cp.fk_type, cp.description, cp.halfday, cp.statut as status";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."holiday cp";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user u ON cp.fk_user = u.rowid";
|
||||
$sql .= " WHERE cp.rowid > 0";
|
||||
$sql .= " WHERE cp.entity IN (".getEntity('holiday').") AND cp.rowid > 0";
|
||||
$sql .= " AND cp.statut = ".Holiday::STATUS_APPROVED;
|
||||
$sql .= " AND (";
|
||||
$sql .= " (date_format(cp.date_debut, '%Y-%m') = '".$db->escape($year_month)."' OR date_format(cp.date_fin, '%Y-%m') = '".$db->escape($year_month)."')";
|
||||
|
||||
@@ -80,9 +80,9 @@ create table llx_actioncomm
|
||||
fk_element integer DEFAULT NULL, -- For link to an element (proposal, invoice, order, ...)
|
||||
elementtype varchar(255) DEFAULT NULL, -- For link to an element (proposal, invoice, order, ...)
|
||||
|
||||
ip varchar(250), --ip used to create record (for public submission page)
|
||||
ip varchar(250), -- ip used to create record (for public submission page)
|
||||
|
||||
fk_bookcal_calendar integer DEFAULT NULL, --fk_bookcal_calendar used to link booking to bookcal calendar
|
||||
fk_bookcal_calendar integer DEFAULT NULL, -- fk_bookcal_calendar used to link booking to bookcal calendar
|
||||
|
||||
import_key varchar(14),
|
||||
extraparams varchar(255) -- for other parameters with json format
|
||||
|
||||
Reference in New Issue
Block a user