You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
135 lines
3.5 KiB
JavaScript
135 lines
3.5 KiB
JavaScript
import { saveconfig, dataJpinjam } from '{js}ts-posting-saveconfig.js?v={time}';
|
|
|
|
console.log("posting")
|
|
|
|
var objectForm = {
|
|
title: function () {
|
|
return 'Posting Simpanan'
|
|
},
|
|
table: "",
|
|
idform: "containerforms",
|
|
newkode: ``,
|
|
kode: 'kode',
|
|
pagin: false,
|
|
view: ['faktur','kodesp', 'tgl', 'faktur', 'kode', 'jumlah', 'keterangan'],
|
|
dataSelect: ["*"],
|
|
queryTemp: "SELECT {select} FROM dept || ORDER BY kode DESC",
|
|
validasiForm: ['kodetagihan', 'cash'],
|
|
viewonly: true,
|
|
noStartOrder: true,
|
|
oncreate: function () {
|
|
_setval('tgl', tanggal().normal);
|
|
var _ld = cssLoader();
|
|
AuditDevQuery(
|
|
'SELECT kode id, nama text FROM acc ORDER BY kode ASC'
|
|
+'[;]'
|
|
+'SELECT * FROM mtagihan WHERE statusposting = 0'
|
|
+'[;]'
|
|
+'SELECT * FROM jpinjam'
|
|
, function(d){
|
|
let [acc, tagihan, jpinjam] = d;
|
|
jpinjam = jpinjam.filter(function(re){
|
|
if(re.kode != 'PT'){
|
|
return re;
|
|
}
|
|
});
|
|
console.log(jpinjam);
|
|
dataJpinjam.set(jpinjam);
|
|
window._mtagihan = tagihan;
|
|
if(typeof _setOption != 'undefined'){
|
|
if(typeof tagihan != 'undefined'){
|
|
_setOption('kodetagihan', removeDuplicate(_mtagihan, ['kodetagihan', 'kodetagihan']));
|
|
}
|
|
_setOption('cash', acc);
|
|
_setOption('cashin', acc);
|
|
if(Array.isArray(acc)){
|
|
if(acc.length > 0){
|
|
let secondAcc = acc[3].id;
|
|
let fistAcc = acc[2].id;
|
|
_setval('cash', secondAcc);
|
|
_setval('cashin', fistAcc);
|
|
}
|
|
}
|
|
}
|
|
_ld.remove();
|
|
table.draw(false);
|
|
});
|
|
},
|
|
onupdate: function (dt) {
|
|
globalThis['kode'].parent.setAttribute('readonly', true);
|
|
},
|
|
custcondition: function (a) {
|
|
return '';
|
|
},
|
|
onviewonly: saveconfig,
|
|
data: [
|
|
{
|
|
title: 'Kode Tagihan',
|
|
type: 'select',
|
|
name: 'kodetagihan',
|
|
row: 12,
|
|
line: 120,
|
|
data: [],
|
|
readonly: false,
|
|
action: function () {
|
|
|
|
},
|
|
},
|
|
{
|
|
title: 'Tgl. Transaksi',
|
|
type: 'date',
|
|
name: 'tgl',
|
|
row: 12,
|
|
line: 120,
|
|
readonly: false,
|
|
action: function () {
|
|
|
|
},
|
|
},
|
|
{
|
|
title: 'Bayar USP Dari',
|
|
type: 'select',
|
|
name: 'cash',
|
|
row: 12,
|
|
line: 120,
|
|
data: [],
|
|
readonly: false,
|
|
action: function () {
|
|
|
|
},
|
|
},
|
|
{
|
|
title: 'Bayar INDUK Dari',
|
|
type: 'select',
|
|
name: 'cashin',
|
|
row: 12,
|
|
line: 120,
|
|
data: [],
|
|
unfollow: true,
|
|
readonly: false,
|
|
action: function () {
|
|
|
|
},
|
|
},
|
|
{
|
|
title: 'Kasir',
|
|
type: 'text',
|
|
name: 'kasir',
|
|
row: 6,
|
|
readonly: true,
|
|
action: function () {
|
|
|
|
},
|
|
},
|
|
{
|
|
title: 'Jam',
|
|
type: 'text',
|
|
name: 'jam',
|
|
row: 6,
|
|
readonly: true,
|
|
action: function () {
|
|
|
|
},
|
|
}
|
|
]
|
|
}; |