added improvements on set proces and minor other improvements
This commit is contained in:
@@ -18,10 +18,21 @@ let $bct = {
|
||||
},
|
||||
in: 'Rechnungsnummer',
|
||||
bt: 'Buchungstexte',
|
||||
bv: 'Buchungswert (volle €)'
|
||||
bv: 'Buchungswert (volle €)',
|
||||
mbe: 'Manuelle Buchung erfassen',
|
||||
mbc: 'Manuelle Buchung ändern',
|
||||
mbd: 'Manuelle Buchung löschen',
|
||||
mbdc: 'Manuelle Buchung wirklich löschen?\nDieser Vorgang kann nicht rückgängig gemacht werden.'
|
||||
};
|
||||
|
||||
let $bcol = {
|
||||
man: new fields_definition('Manuelle Buchung', 'Manuelle Buchungen', [
|
||||
{ name: 'taID', type: 'hidden' },
|
||||
{ name: 'ValueDate', label: 'Valuta', type: 'date', required: true },
|
||||
{ name: 'Amount', label: 'Betrag', type: 'number', precision: '0.01', required: true },
|
||||
{ name: 'NameOfPayer', label: 'Name', type: 'string' },
|
||||
{ name: 'SepaRemittanceInformation', label: 'Verwendungszweck', type: 'string' }
|
||||
]),
|
||||
qtl: new fields_definition('Kontobericht', 'Kontoberichte', [
|
||||
{ name: 'InvoiceId', label: 'RechnungsNr', type: 'string' },
|
||||
{ name: 'ValueDate', label: 'Valuta', type: 'date' },
|
||||
@@ -77,11 +88,16 @@ let $bam = {
|
||||
let fds = bool(ix.fds, false), id = ix.taID, m = [];
|
||||
m.push({ lbl: $bct.smd, fnc: () => { $bam.smd(id); } });
|
||||
m.push({ lbl: $bct.ati, fnc: () => { $bam.ati(id); } });
|
||||
if (bool(ix.IsManual, false) === true) {
|
||||
m.push({ lbl: $bct.mbc, fnc: () => { $bam.mbc(id); } });
|
||||
m.push({ lbl: $bct.mbd, fnc: () => { $bam.mbd(id); } });
|
||||
}
|
||||
return $('#topbar').ocmsmenu(m);
|
||||
}, eM : (r, re, opt) => {
|
||||
let m = [];
|
||||
if ($fis.isAuth('fds_bam', 2) === true) {
|
||||
m.push({ lbl: $bct.upl, fnc: $bam.ubs});
|
||||
m.push({ lbl: $bct.mbe, fnc: $bam.mbe});
|
||||
}
|
||||
if (bool(r, false) === true) {
|
||||
m.push({ lbl: $bct.rel, fnc: $bam.renderLst });
|
||||
@@ -353,6 +369,32 @@ let $bam = {
|
||||
}
|
||||
}
|
||||
});
|
||||
}, mbe: () => {
|
||||
$bam.manForm({});
|
||||
}, mbc: (taid) => {
|
||||
$ocms.postXT({
|
||||
url: $ocms.url('bam/mget'), data: { taid: taid }, success: (dta) => {
|
||||
$bam.manForm(dta || {});
|
||||
}
|
||||
});
|
||||
}, mbd: (taid) => {
|
||||
if (confirm($bct.mbdc)) {
|
||||
$ocms.postXT({
|
||||
url: $ocms.url('bam/mdel'), data: { taid: taid }, success: () => {
|
||||
$bam.renderLst();
|
||||
}
|
||||
});
|
||||
}
|
||||
}, manForm: (dta) => {
|
||||
let flds = $bcol.man.clone().applyValues(dta || {});
|
||||
$ocms.dlgform(flds, {
|
||||
title: (ne(dta.taID, '') !== '') ? $bct.mbc : $bct.mbe,
|
||||
url: $ocms.url('bam/man'),
|
||||
typedvalues: true,
|
||||
success: () => {
|
||||
$bam.renderLst();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user