add modules folder based on s_menu

This commit is contained in:
2026-06-30 10:16:11 +07:00
parent 315b657ee3
commit a1aab09ac9
625 changed files with 192283 additions and 794 deletions

View File

@@ -0,0 +1,76 @@
<template>
<v-dialog v-model="dialog_close_jurnal" persistent width="40vw">
<v-card>
<v-card-title class="headline grey lighten-2" primary-title>
TUTUP SEMUA JURNAL PADA PERIODE {{ selected_periode.periodeName }}
</v-card-title>
<v-card-text>
<div v-for="item in jurnal_to_close" :key="item.jurnalIsPosted">
<p v-if="item.jurnalIsPosted == 'N'">
Jumlah jurnal yang tidak dapat ditutup: <strong>{{ item.total_jurnal }}</strong>
</p>
<p v-else>
Jumlah jurnal yang dapat ditutup: <strong>{{ item.total_jurnal }}</strong>
</p>
</div>
<p>
Apakah anda yakin akan menutup semua jurnal yang dibuat di
<strong> {{ area_jurnal }} </strong> dalam rentang waktu <br>
<strong>{{ selected_periode.periode }}</strong> <br>
</p>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="error" outline flat @click="dialog_close_jurnal = false">Batal</v-btn>
<v-btn color="primary" dark @click="closeJurnal()">Ya</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<script>
module.exports = {
data() {
return {
}
},
computed: {
selected_periode() {
return this.$store.state.journal.selected_periode
},
area_jurnal() {
const user = this.$store.state.journal.user
if (user.M_BranchID == '0') {
return `Regional ${user.S_RegionalName}`
} else {
return `Cabang ${user.M_BranchName}, Regional ${user.S_RegionalName}`
}
},
jurnal_to_close() {
return this.$store.state.journal.jurnal_to_close
},
dialog_close_jurnal: {
get() {
return this.$store.state.journal.dialog_close_jurnal
},
set(val) {
this.$store.commit("journal/update_dialog_close_jurnal", val)
}
}
},
methods: {
closeJurnal() {
var jurnal = this.jurnal_to_close.find(item => item.jurnalIsPosted === 'Y')
if (jurnal && Number(jurnal.total_jurnal) > 0) {
this.$store.dispatch("journal/closeJurnalPerPeriode", { typeid: jurnal.JurnalTypeID })
return;
}
this.$store.commit("journal/update_open_dialog_info", true);
this.$store.commit("journal/update_msg_info",
"Tidak ada jurnal yang dapat ditutup"
);
}
},
}
</script>

View File

@@ -0,0 +1,223 @@
<template>
<v-dialog v-model="dialog_edit_jurnal" persistetnt width="70vw">
<v-card>
<v-card-title class="headline grey lighten-2" primary-title>
EDIT JOURNAL PENDAPATAN AR
</v-card-title>
<v-card-text>
<v-layout row wrap>
<v-flex xs6 pa-1 pr-3>
<div class="font-weight-bold">Company Name</div>
<div class="pa-2 grey lighten-2">
{{ selected_journal.M_BranchCompanyName }}
</div>
</v-flex>
<v-flex xs6 pa-1 pl-3>
<div class="font-weight-bold">Journal</div>
<div class="pa-2 grey lighten-2">
{{ selected_journal.jurnalTitle }}
</div>
</v-flex>
<v-flex xs6 pa-1 pr-3>
<div class="font-weight-bold">Regional</div>
<div class="pa-2 grey lighten-2">
{{ selected_journal.S_RegionalName }}
</div>
</v-flex>
<v-flex xs6 pa-1 pl-3>
<div class="font-weight-bold">Journal Date</div>
<div class="pa-2 grey lighten-2">
{{ selected_journal.jurnalDate }}
</div>
</v-flex>
<v-flex xs6 pa-1 pr-3>
<div class="font-weight-bold">Branch</div>
<div class="pa-2 grey lighten-2">
{{ selected_journal.M_BranchName }}
</div>
</v-flex>
<v-flex xs6 pa-1 pl-3>
<div class="font-weight-bold">Journal Type</div>
<div class="pa-2 grey lighten-2">
{{ selected_journal.JurnalTypeName }}
</div>
</v-flex>
</v-layout>
<v-layout row wrap mt-3>
<v-flex xs12>
<v-data-table
:headers="headerdetails" :items="journal_edit"
hide-actions class="elevation-1"
>
<template slot="items" slot-scope="props">
<tr>
<td class="text-xs-center pa-2">{{ props.item.coaAccountNo }}</td>
<td class="text-xs-left pa-2">
<v-autocomplete
label="Account" hide-details outline
v-model="props.item.coaAccountNo"
:items="list_coa" item-text="coaDescription"
item-value="coaAccountNo"
></v-autocomplete>
</td>
<td class="text-xs-left pa-2">{{ props.item.jurnalAddOnValue }}</td>
<td class="text-xs-center pa-2">{{ props.item.coaCurrencyCode }}</td>
<td class="text-xs-right pa-2">{{ formatCurrency(props.item.jurnalTxDebit) }}</td>
<td class="text-xs-right pa-2">{{ formatCurrency(props.item.jurnalTxCredit) }}</td>
</tr>
</template>
<template v-slot:footer>
<tr>
<td colspan="4" class="font-weight-bold pa-2">TOTAL</td>
<td class="text-xs-right pa-2 font-weight-bold">
{{ formatCurrency(xsummary.debit) }}
</td>
<td class="text-xs-right pa-2 font-weight-bold">
{{ formatCurrency(xsummary.credit) }}
</td>
</tr>
<tr>
<td colspan="5" class="font-weight-bold pa-2">BALANCE</td>
<td width="10%" class="text-xs-right pa-2 font-weight-bold">
{{ formatCurrency(xsummary.balance) }}
</td>
</tr>
</template>
</v-data-table>
</v-flex>
</v-layout>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="error" outline flat @click="closeEditDialog()">Batal</v-btn>
<v-btn color="primary" dark @click="simpanEditDialog()">Simpan</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<script>
module.exports = {
data() {
return {
headerdetails: [
{
text: "AKUN", align: "center", sortable: false,
value: "action", width: "20%", class: "pa-2 pl-2 blue lighten-3 white--text",
},
{
text: "DESKRIPSI", align: "center", sortable: false,
value: "mr", width: "25%", class: "pa-2 blue lighten-3 white--text",
},
{
text: "INFO", align: "center", sortable: false,
value: "lab", width: "15%", class: "pa-2 blue lighten-3 white--text",
},
{
text: "CURRENCY", align: "center", sortable: false,
value: "lab", width: "10%", class: "pa-2 blue lighten-3 white--text",
},
{
text: "DEBIT", align: "center", sortable: false,
value: "lab", width: "15%", class: "pa-2 blue lighten-3 white--text",
},
{
text: "CREDIT", align: "center", sortable: false,
value: "lab", width: "15%", class: "pa-2 blue lighten-3 white--text",
}
]
}
},
computed: {
dialog_edit_jurnal: {
get() {
return this.$store.state.journal.dialog_edit_journal;
},
set(val) {1
this.$store.commit("journal/update_dialog_edit_journal", val);
}
},
selected_journal: {
get() {
return this.$store.state.journal.selected_journal;
},
set(val) {
this.$store.commit("journal/update_selected_journal", val);
},
},
journal_edit: {
get() {
return this.$store.state.journal.journal_edit
},
set(val) {
this.$store.commit("journal/update_journal_edit", val);
}
},
selected_periode() {
return this.$store.state.journal.selected_periode
},
xsummary() {
return this.$store.state.journal.summary
},
list_coa() {
return this.$store.state.journal.list_coa
}
},
methods: {
formatCurrency(val) {
const price = parseFloat(val);
const IDR = new Intl.NumberFormat("id-ID", {
style: "currency",
currency: "IDR"
});
return `${IDR.format(price)}`;
},
simpanEditDialog() {
const originaldetail = this.selected_journal.detailtx;
const editnewdetails = this.journal_edit;
const listcoa = this.list_coa;
const originalMap = new Map();
for (const item of originaldetail) {
originalMap.set(item.jurnalTxID, item.coaAccountNo);
}
const coaMap = new Map();
for (const coaItem of listcoa) {
coaMap.set(coaItem.coaAccountNo, coaItem);
}
const editeddetail = editnewdetails.flatMap(detail => {
const originalAcc = originalMap.get(detail.jurnalTxID);
if (originalAcc !== detail.coaAccountNo) {
const accMatch = coaMap.get(detail.coaAccountNo);
if (accMatch) {
return [{
jurnalID: detail.jurnalTxJurnalID,
jurnalTxID: detail.jurnalTxID,
coaID: accMatch.coaID,
coaDescription: accMatch.coaDescription,
coaAccountNo: accMatch.coaAccountNo
}]
} else {
return [];
}
} else {
return [];
}
})
this.$store.dispatch("journal/saveEditJurnal", editeddetail);
},
closeEditDialog() {
this.selected_journal = {};
this.journal_edit = [];
this.dialog_edit_jurnal = false;
}
},
watch: {
},
}
</script>

View File

@@ -0,0 +1,68 @@
<template>
<v-dialog v-model="dialog_confirm_posting" persistetnt width="40vw">
<v-card>
<v-card-title class="headline grey lighten-2" primary-title>
POSTING SEMUA JURNAL PADA PERIODE {{ selected_periode.periodeName }}
</v-card-title>
<v-card-text>
<div v-for="item in total_jurnal_not_posted" :key="item.jurnalEditStatus">
<p v-if="item.jurnalEditStatus == 'N'">
Jumlah jurnal yang dapat diposting: <strong>{{ item.total_jurnal }}</strong>
</p>
<p v-if="item.jurnalEditStatus == 'Y'">
Jumlah jurnal yang tidak dapat diposting: <strong>{{ item.total_jurnal }}</strong>
(belum diverifikasi setelah edit)
</p>
</div>
<p>
Apakah anda yakin akan melakukan posting semua jurnal yang dibuat dalam rentang waktu
<strong>{{ selected_periode.periode }}</strong> ?
</p>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="error" outline flat @click="dialog_confirm_posting = false">Batal</v-btn>
<v-btn color="primary" dark @click="postingJurnal()">Ya</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<script>
module.exports = {
data() {
return {
}
},
computed: {
selected_periode() {
return this.$store.state.journal.selected_periode
},
total_jurnal_not_posted() {
return this.$store.state.journal.total_jurnal_not_posted
},
dialog_confirm_posting: {
get() {
return this.$store.state.journal.dialog_confirm_posting;
},
set(val) {1
this.$store.commit("journal/update_dialog_confirm_posting", val);
}
},
},
methods: {
postingJurnal() {
var jurnal = this.total_jurnal_not_posted.find(jrnl => jrnl.jurnalEditStatus === 'N')
if (jurnal && Number(jurnal.total_jurnal) > 0) {
this.$store.dispatch("journal/postingJurnal", { typeid: jurnal.JurnalTypeID });
return;
}
this.$store.commit("journal/update_open_dialog_info", true);
this.$store.commit("journal/update_msg_info",
"semua jurnal para periode ini sudah terposting"
);
}
},
}
</script>

View File

@@ -0,0 +1,58 @@
<template>
<v-dialog v-model="dialog_request_edit" persistent width="40vw">
<v-card>
<v-card-title class="headline grey lighten-2" primary-title>
REQUEST EDIT JURNAL {{ selected_journal.jurnalNo }}
</v-card-title>
<v-card-text>
<p v-if="selected_journal.JurnalRequestEditStatusEdit == 'approved'">
Jurnal ini sudah pernah diedit sebelumnya oleh:
{{ selected_journal.JurnalRequestEditStaffName }} <br>
Apakah anda yakin akan mengajukan permintaan untuk melakukan perubahan lagi? <br>
Nomor: <strong>{{ selected_journal.jurnalNo }}</strong> <br>
Judul: <strong>{{ selected_journal.jurnalTitle }}</strong> <br>
Deskripsi: {{ selected_journal.jurnalDescription }} <br>
</p>
<p v-else>
Apakah anda yakin akan mengajukan permintaan untuk melakukan perubahan jurnal: <br>
Nomor: <strong>{{ selected_journal.jurnalNo }}</strong> <br>
Judul: <strong>{{ selected_journal.jurnalTitle }}</strong> <br>
Deskripsi: {{ selected_journal.jurnalDescription }} <br>
</p>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="error" outline @click="dialog_request_edit = false">Batal</v-btn>
<v-btn color="primary" dark @click="requestEdit()">Ya</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<script>
module.exports = {
data() {
return {
}
},
computed: {
dialog_request_edit: {
get() {
return this.$store.state.journal.dialog_request_edit
},
set(val) {
this.$store.commit("journal/update_dialog_request_edit", val)
}
},
selected_journal() {
return this.$store.state.journal.selected_journal
}
},
methods: {
requestEdit() {
this.$store.dispatch("journal/requestEditJurnal");
}
},
}
</script>

File diff suppressed because it is too large Load Diff