forked from Wavyzz/dolibarr
Compare commits
27 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b1d57a6bd1 | ||
|
|
16904d12f8 | ||
|
|
1525b9c85e | ||
|
|
ffe07999cf | ||
|
|
24146d89c5 | ||
|
|
477d755bbc | ||
|
|
f85b53a4ca | ||
|
|
a6e01fe7b7 | ||
|
|
43c2336683 | ||
|
|
e1b919366e | ||
|
|
40e4a6959f | ||
|
|
52ae202aff | ||
|
|
2ca2fe7f28 | ||
|
|
140310c508 | ||
|
|
64cf2513bd | ||
|
|
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
|
||||
21
.github/workflows/pr-18-autolabel.yaml.disabled
vendored
21
.github/workflows/pr-18-autolabel.yaml.disabled
vendored
@@ -1,21 +0,0 @@
|
||||
name: "Set label for v18"
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
branches:
|
||||
- "18.0"
|
||||
push:
|
||||
branches:
|
||||
- "18.0"
|
||||
|
||||
jobs:
|
||||
changed-lines-count-labeler:
|
||||
runs-on: ubuntu-latest
|
||||
name: An action for automatically labelling pull requests based on the changed lines count
|
||||
steps:
|
||||
- name: Set a label
|
||||
uses: vkirilichev/changed-lines-count-labeler@v0.2
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
configuration-path: .github/changed-lines-count-labeler.yml
|
||||
continue-on-error: true
|
||||
20
.github/workflows/pr-18.yaml
vendored
20
.github/workflows/pr-18.yaml
vendored
@@ -6,7 +6,7 @@
|
||||
# Go on Organisation - Secret and variables and create a variable PR18_APP_ID and copy the ID of the previously create ID. Choose the repository access to "Repository Dolibarr".
|
||||
#
|
||||
|
||||
name: Set reviewer for v18
|
||||
name: Set reviewer and label for v18
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, synchronize, reopened]
|
||||
@@ -16,11 +16,19 @@ on:
|
||||
branches:
|
||||
- "18.0"
|
||||
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
issues: write
|
||||
|
||||
jobs:
|
||||
pr18:
|
||||
assign-and-label-v18:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
#- name: Install GitHub CLI
|
||||
# run: sudo apt-get install gh
|
||||
|
||||
- name: Generate a token
|
||||
id: generate-token
|
||||
uses: actions/create-github-app-token@v2
|
||||
@@ -36,6 +44,8 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
|
||||
url: ${{ github.event.pull_request.html_url }}
|
||||
run: |
|
||||
gh pr edit "$url" --add-reviewer rycks
|
||||
gh pr edit "$url" --add-reviewer lvessiller-opendsi
|
||||
|
||||
echo "env.url=${{env.url}}"
|
||||
gh pr edit "${{env.url}}" --add-reviewer rycks
|
||||
gh pr edit "${{env.url}}" --add-reviewer lvessiller-opendsi
|
||||
#gh pr edit "${{env.url}}" --add-reviewer eldy
|
||||
gh pr edit "${{env.url}}" --add-label "Issue for v18 maintenance Team"
|
||||
|
||||
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}}"
|
||||
@@ -928,12 +928,13 @@ 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";
|
||||
if ($last_depreciation_date !== "") $sql .= " AND " . MAIN_DB_PREFIX . "asset_depreciation.ref != ''";
|
||||
$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 ref != ''";
|
||||
}
|
||||
$resql = $this->db->query($sql);
|
||||
if (!$resql) {
|
||||
$this->errors[] = $langs->trans('AssetErrorClearDepreciationLines') . ': ' . $this->db->lasterror();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -1515,6 +1515,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;
|
||||
@@ -1539,6 +1542,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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3240,7 +3240,7 @@ class Facture extends CommonInvoice
|
||||
$this->date = dol_now();
|
||||
$this->date_lim_reglement = $this->calculate_date_lim_reglement();
|
||||
}
|
||||
if (!empty($conf->global-> INVOICE_CHECK_POSTERIOR_DATE)) {
|
||||
if (!empty($conf->global->INVOICE_CHECK_POSTERIOR_DATE)) {
|
||||
$last_of_type = $this->willBeLastOfSameType(true);
|
||||
if (!$last_of_type[0]) {
|
||||
$this->error = $langs->transnoentities("ErrorInvoiceIsNotLastOfSameType", $this->ref, dol_print_date($this->date, 'day'), dol_print_date($last_of_type[1], 'day'));
|
||||
|
||||
@@ -1146,6 +1146,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;
|
||||
@@ -1160,7 +1161,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, ...
|
||||
}
|
||||
|
||||
@@ -627,7 +627,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) {
|
||||
|
||||
@@ -427,7 +427,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->fk_statut;
|
||||
$this->status = $obj->fk_statut;
|
||||
|
||||
@@ -1006,6 +1006,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
$this->extraparams = isset($obj->extraparams) ? (array) json_decode($obj->extraparams, true) : array();
|
||||
|
||||
$this->socid = $obj->socid;
|
||||
$this->thirdparty = null; // Clear if another value was already set by fetch_thirdparty
|
||||
$this->socnom = $obj->socnom;
|
||||
|
||||
// Retrieve all extrafield
|
||||
|
||||
@@ -156,7 +156,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)."')";
|
||||
|
||||
Reference in New Issue
Block a user