Merge branch 'staging' into 'production'
HOTFIXESdevis list group facturation redirect See merge request sottye/hytha35!6
This commit is contained in:
commit
459fda7106
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -2,6 +2,8 @@ import {showError, showSuccess } from "@nextcloud/dialogs";
|
||||
import {baseUrl, hideLoader, showLoader} from "../modules/mainFunction.mjs";
|
||||
import { Devis } from "../objects/devis.mjs";
|
||||
import DataTable from "datatables.net";
|
||||
import { FactureTypeGroup } from "../constants/invoiceConstant";
|
||||
import { generateUrl } from "@nextcloud/router";
|
||||
window.addEventListener("DOMContentLoaded", function () {
|
||||
|
||||
const today = new Date();
|
||||
@ -33,6 +35,12 @@ $('body').on('click', '#closeDevisModal', function () {
|
||||
|
||||
|
||||
$('body').on('click', '#invoiceQuote', function () {
|
||||
var factureTypeSelect = document.getElementById("factureTypeSelect");
|
||||
var selectedValue = factureTypeSelect.value;
|
||||
if(selectedValue == FactureTypeGroup){
|
||||
window.location.replace(generateUrl(`/apps/gestion/devis/apercus?cli=&annee=${(new Date()).getFullYear()}&mois=${(new Date()).getMonth()}&filterType=group`));
|
||||
return;
|
||||
}
|
||||
var dateValue = document.getElementById("facturationDate").value;
|
||||
var oTable = $('.tabledt').dataTable();
|
||||
var rowcollection = oTable.$(".devisToFacture:checked", {"page": "all"});
|
||||
@ -47,9 +55,6 @@ $('body').on('click', '#invoiceQuote', function () {
|
||||
showError(t('gestion', "Veuillez choisir une ligne de devis à facturer"));
|
||||
return;
|
||||
}
|
||||
|
||||
var factureTypeSelect = document.getElementById("factureTypeSelect");
|
||||
var selectedValue = factureTypeSelect.value;
|
||||
let devisToFacturePayload = {
|
||||
devisToFacture: devisToFacture,
|
||||
paymentDate: dateValue,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user