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,167 @@
<template>
<v-dialog v-model="dialog_add_jurnaltrx" persistent width="60vw">
<v-card>
<v-card-title class="headline grey lighten-2">
TAMBAH TRANSAKSI JURNAL
</v-card-title>
<v-card-text>
<v-layout row wrap>
<v-flex xs2 pr-1>
<v-text-field
v-model="trx_acc.coaAccountNo" hide-details
label="Nomor Account" outline readonly
></v-text-field>
</v-flex>
<v-flex xs3 px-1>
<v-autocomplete
label="Deskripsi Account" hide-details outline
v-model="trx_acc" :items="list_account"
item-text="coaDescription" return-object
></v-autocomplete>
</v-flex>
<v-flex xs3 px-1>
<v-text-field
v-model="trx_info" hide-details
label="Informasi Transaksi" outline
></v-text-field>
</v-flex>
<v-flex xs2 px-1>
<v-text-field
v-model="trx_debit" hide-details @blur="handleBlur('trx_debit')"
label="Debit" outline prefix="Rp." @focus="handleFocus('trx_debit')"
></v-text-field>
</v-flex>
<v-flex xs2 pl-1>
<v-text-field
v-model="trx_kredit" hide-details @blur="handleBlur('trx_kredit')"
label="Kredit" outline prefix="Rp." @focus="handleFocus('trx_kredit')"
></v-text-field>
</v-flex>
</v-layout>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn @click="batalJurnalTrx()" color="red" class="white--text">Batal</v-btn>
<v-btn @click="simpanJurnalTrx()" color="primary" class="white--text">Simpan</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<script>
module.exports = {
data() {
return {
trx_acc: {},
trx_info: "",
trx_debit: 0.00,
trx_kredit: 0.00
}
},
computed: {
dialog_add_jurnaltrx: {
get() {
return this.$store.state.journal.dialog_add_jurnaltrx
},
set(val) {
this.$store.commit("journal/update_dialog_add_jurnaltrx", val)
}
},
list_account() {
return this.$store.state.journal.list_account
},
journal_balik_new() {
return this.$store.state.journal.journal_balik_new
},
summary_balik_new() {
return this.$store.state.journal.summary_balik_new
}
},
methods: {
formatCurrency(value) {
const num = parseFloat(value);
if (isNaN(num)) return 0;
return num.toFixed(2).replace('.', ',').replace(/\B(?=(\d{3})+(?!\d))/g, ".");
},
parseCurrency(value) {
let cleanedValue = String(value).replace(/\./g, '');
cleanedValue = cleanedValue.replace(',', '.');
return parseFloat(cleanedValue) || 0;
},
handleFocus(modelname) {
const currentValue = this[modelname];
this[modelname] = String(currentValue).replace(/\./g, '');
},
handleBlur(modelname) {
const currentValue = this[modelname];
const parsedValue = this.parseCurrency(currentValue);
this[modelname] = parsedValue;
this[modelname] = this.formatCurrency(parsedValue);
},
batalJurnalTrx() {
this.dialog_add_jurnaltrx = false
},
simpanJurnalTrx() {
let temp_trx = JSON.parse(JSON.stringify(this.journal_balik_new))
var count = temp_trx.length
const debit = this.parseCurrency(this.trx_debit);
const kredit = this.parseCurrency(this.trx_kredit);
let new_trx = {
...this.trx_acc,
jurnalTxID: "temp_" + (count + 1),
jurnalTxCoaID: this.trx_acc.coaID,
jurnalTxDebit: debit,
jurnalTxCredit: kredit,
jurnalTxDescription: this.trx_acc.coaDescription,
jurnalAddOnValue: this.trx_info
}
temp_trx.push(new_trx)
const total = temp_trx.reduce((acc, item) => {
const debit = Number(item.jurnalTxDebit)
const kredit = Number(item.jurnalTxCredit)
acc.total_debit += debit
acc.total_kredit += kredit
return acc
}, {total_debit: 0, total_kredit: 0 })
total.balance = total.total_debit - total.total_kredit
this.$store.commit("journal/update_journal_balik_new", temp_trx)
this.$store.commit("journal/update_summary_balik_new", total)
this.dialog_add_jurnaltrx = false
}
},
watch: {
dialog_add_jurnaltrx(val) {
if (val) {
this.$nextTick(() => {
this.trx_acc = {}
this.trx_info = ""
this.trx_debit = 0.00
this.trx_kredit = 0.00
})
}
},
trx_debit: {
immediate: true,
handler(newValue) {
if (typeof newValue === 'number') {
this.trx_debit = this.formatCurrency(newValue);
}
}
},
trx_kredit: {
immediate: true,
handler(newValue) {
if (typeof newValue === 'number') {
this.trx_kredit = this.formatCurrency(newValue);
}
}
}
}
}
</script>

View File

@@ -0,0 +1,365 @@
<template>
<v-dialog v-model="dialog_journal_balik" persistent width="90vw" scrollable>
<v-card>
<v-card-title class="headline grey lighten-2">
KOREKSI JURNAL
</v-card-title>
<v-card-text style="max-height: 80vh;">
<v-layout row wrap>
<v-flex xs6 pa-1>
<div class="font-weight-bold">Company Name</div>
<div class="pa-2 grey lighten-2">
{{ selected_journal_closed.M_BranchCompanyName }}
</div>
</v-flex>
<v-flex xs6 pa-1>
<div class="font-weight-bold">Journal</div>
<div class="pa-2 grey lighten-2">
{{ selected_journal_closed.jurnalTitle }}
</div>
</v-flex>
<v-flex xs3 pa-1>
<div class="font-weight-bold">Regional</div>
<div class="pa-2 grey lighten-2">
{{ selected_journal_closed.S_RegionalName }}
</div>
</v-flex>
<v-flex xs3 pa-1>
<div class="font-weight-bold">Branch</div>
<div class="pa-2 grey lighten-2">
{{ selected_journal_closed.M_BranchName ?? "-" }}
</div>
</v-flex>
<v-flex xs3 pa-1>
<div class="font-weight-bold">Journal Date</div>
<div class="pa-2 grey lighten-2">
{{ selected_journal_closed.jurnalDate }}
</div>
</v-flex>
<v-flex xs3 pa-1>
<div class="font-weight-bold">Journal Type</div>
<div class="pa-2 grey lighten-2">
{{ selected_journal_closed.JurnalTypeName }}
</div>
</v-flex>
</v-layout>
<v-layout row wrap class="mt-2">
<v-flex xs6 pr-1>
<h3>Jurnal Awal</h3>
<v-data-table
:headers="headers" class="elevation-1"
:items="selected_journal_closed.detail" hide-actions
>
<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">{{ props.item.coaDescription }}</td>
<td class="text-xs-left pa-2">{{ props.item.jurnalAddOnValue }}</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="3" class="font-weight-bold pa-2">TOTAL</td>
<td class="text-xs-right pa-2 font-weight-bold">
{{ formatCurrency(selected_journal_closed.totals.total_debit ?? 0) }}
</td>
<td class="text-xs-right pa-2 font-weight-bold">
{{ formatCurrency(selected_journal_closed.totals.total_kredit ?? 0) }}
</td>
</tr>
<tr>
<td colspan="4" class="font-weight-bold pa-2">BALANCE</td>
<td class="text-xs-right pa-2 font-weight-bold">
{{ formatCurrency(selected_journal_closed.totals.balance ?? 0) }}
</td>
</tr>
</template>
</v-data-table>
</v-flex>
<v-flex xs6 pl-1>
<h3>Jurnal Balik</h3>
<v-data-table
:headers="headers_balik" class="elevation-1"
:items="journal_detail_balik.transaction" hide-actions
>
<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">{{ props.item.coaDescription }}</td>
<td class="text-xs-left pa-2">{{ props.item.jurnalAddOnValue }}</td>
<td class="text-xs-right pa-2">{{ formatCurrency(props.item.jurnalTxCredit) }}</td>
<td class="text-xs-right pa-2">{{ formatCurrency(props.item.jurnalTxDebit) }}</td>
</tr>
</template>
<template v-slot:footer>
<tr>
<td colspan="3" class="font-weight-bold pa-2">TOTAL</td>
<td class="text-xs-right pa-2 font-weight-bold">
{{ formatCurrency(journal_detail_balik.summary.total_kredit ?? 0) }}
</td>
<td class="text-xs-right pa-2 font-weight-bold">
{{ formatCurrency(journal_detail_balik.summary.total_debit ?? 0) }}
</td>
</tr>
<tr>
<td colspan="4" class="font-weight-bold pa-2">BALANCE</td>
<td class="text-xs-right pa-2 font-weight-bold">
{{ formatCurrency(journal_detail_balik.summary.balance ?? 0) }}
</td>
</tr>
</template>
</v-data-table>
</v-flex>
</v-layout>
<v-layout row wrap class="mt-2">
<v-flex grow pr-1>
<h3>Jurnal Penyesuaian</h3>
</v-flex>
<v-flex shrink pl-1>
<v-btn
color="primary" dark @click="addTransactions()"
style="min-width: 50px; margin: 0;" small
>
<v-icon small>add</v-icon>
</v-btn>
</v-flex>
<v-flex xs12 mt-2>
<v-data-table
:headers="headers_trx" class="elevation-1"
:items="journal_balik_new" hide-actions
>
<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">{{ props.item.coaDescription }}</td>
<td class="text-xs-left pa-2">{{ props.item.jurnalAddOnValue }}</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>
<td class="text-xs-center pa-2">
<v-btn
color="red" dark @click="removeTransaction(props.item)"
style="min-width: 50px; margin: 0;" small
>
<v-icon small>delete</v-icon>
</v-btn>
</td>
</tr>
</template>
<template v-slot:footer>
<tr>
<td colspan="3" class="font-weight-bold pa-2">TOTAL</td>
<td class="text-xs-right pa-2 font-weight-bold">
{{ formatCurrency(summary_balik_new.total_debit) }}
</td>
<td class="text-xs-right pa-2 font-weight-bold">
{{ formatCurrency(summary_balik_new.total_kredit) }}
</td>
</tr>
<tr>
<td colspan="4" class="font-weight-bold pa-2">BALANCE</td>
<td class="text-xs-right pa-2 font-weight-bold">
{{ formatCurrency(summary_balik_new.balance) }}
</td>
</tr>
</template>
</v-data-table>
</v-flex>
</v-layout>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn @click="batalBalikJurnal()" color="red" class="white--text">Batal</v-btn>
<v-btn @click="simpanBalikJurnal()" color="primary" class="white--text">Simpan</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<script>
module.exports = {
data() {
return {
headers: [
{
text: "AKUN", align: "center", sortable: false,
value: "action", width: "15%", class: "pa-1 info white--text",
},
{
text: "DESKRIPSI", align: "center", sortable: false,
value: "action", width: "25%", class: "pa-1 info white--text",
},
{
text: "INFO", align: "center", sortable: false,
value: "action", width: "20%", class: "pa-1 info white--text",
},
{
text: "DEBIT", align: "center", sortable: false,
value: "action", width: "20%", class: "pa-1 info white--text",
},
{
text: "KREDIT", align: "center", sortable: false,
value: "action", width: "20%", class: "pa-1 info white--text",
},
],
headers_balik: [
{
text: "AKUN", align: "center", sortable: false,
value: "action", width: "15%", class: "pa-1 orange white--text",
},
{
text: "DESKRIPSI", align: "center", sortable: false,
value: "action", width: "25%", class: "pa-1 orange white--text",
},
{
text: "INFO", align: "center", sortable: false,
value: "action", width: "20%", class: "pa-1 orange white--text",
},
{
text: "DEBIT", align: "center", sortable: false,
value: "action", width: "20%", class: "pa-1 orange white--text",
},
{
text: "KREDIT", align: "center", sortable: false,
value: "action", width: "20%", class: "pa-1 orange white--text",
},
],
headers_trx: [
{
text: "AKUN", align: "center", sortable: false,
value: "action", width: "15%", class: "pa-1 blue lighten-3 white--text",
},
{
text: "DESKRIPSI", align: "center", sortable: false,
value: "action", width: "25%", class: "pa-1 blue lighten-3 white--text",
},
{
text: "INFO", align: "center", sortable: false,
value: "action", width: "20%", class: "pa-1 blue lighten-3 white--text",
},
{
text: "DEBIT", align: "center", sortable: false,
value: "action", width: "15%", class: "pa-1 blue lighten-3 white--text",
},
{
text: "KREDIT", align: "center", sortable: false,
value: "action", width: "15%", class: "pa-1 blue lighten-3 white--text",
},
{
text: "AKSI", align: "center", sortable: false,
value: "action", width: "10%", class: "pa-1 blue lighten-3 white--text",
},
]
}
},
computed: {
dialog_journal_balik: {
get() {
return this.$store.state.journal.dialog_journal_balik
},
set(val) {
this.$store.commit("journal/update_dialog_journal_balik", val)
}
},
selected_journal_closed: {
get() {
return this.$store.state.journal.selected_journal_closed
},
set(val) {
this.$store.commit("journal/update_selected_journal_closed", val)
}
},
journal_detail_balik: {
get() {
return this.$store.state.journal.journal_detail_balik
},
set(val) {
this.$store.commit("journal/update_journal_detail_balik", val)
}
},
journal_balik_new: {
get() {
return this.$store.state.journal.journal_balik_new
},
set(val) {
this.$store.commit("journal/update_journal_balik_new", val)
}
},
summary_balik_new: {
get() {
return this.$store.state.journal.summary_balik_new
},
set(val) {
this.$store.commit("journal/update_summary_balik_new", val)
}
}
},
methods: {
formatCurrency(amount) {
const price = parseFloat(amount)
const IDR = new Intl.NumberFormat("id-ID", {
style: "currency",
currency: "IDR"
})
return `${IDR.format(price)}`
},
resetState() {
this.selected_journal_closed = {
totals: {
total_debit: 0,
total_kredit: 0,
balance: 0,
}
}
this.journal_detail_balik = {
transaction: [],
summary: {
total_debit: 0,
total_kredit: 0,
balance: 0,
}
}
this.summary_balik_new = {
total_debit: 0,
total_kredit: 0,
balance: 0,
}
},
batalBalikJurnal() {
this.resetState()
this.dialog_journal_balik = false
this.$store.commit("journal/update_dialog_journal", true)
},
addTransactions() {
this.$store.commit("journal/update_dialog_add_jurnaltrx", true)
},
removeTransaction(item) {
let current_trx = JSON.parse(JSON.stringify(this.journal_balik_new))
const new_trx = current_trx.filter(trx => trx.jurnalTxID != item.jurnalTxID)
const summary = new_trx.reduce((acc, item) => {
const debit = Number(item.jurnalTxDebit)
const credit = Number(item.jurnalTxCredit)
acc.total_debit += debit
acc.total_kredit += credit
return acc
}, {total_debit: 0, total_kredit: 0 })
summary.balance = summary.total_debit - summary.total_kredit
this.journal_balik_new = new_trx
this.summary_balik_new = summary
},
simpanBalikJurnal() {
this.$store.dispatch("journal/saveKoreksiJurnal")
}
},
watch: {
},
}
</script>

View File

@@ -0,0 +1,242 @@
<template>
<v-dialog v-model="dialog_journal" persistent width="80vw">
<v-card>
<v-card-title class="headline grey lighten-2" primary-title>
PILIH JURNAL
</v-card-title>
<v-card-text>
<v-layout row align-center>
<v-flex xs2>
<v-menu
v-model="menuStartdateFilter" offset-y lazy min-width="290px"
transition="scale-transition" max-width="290px" full-width
:nudge-right="40" :close-on-content-click="false"
>
<template v-slot:activator="{on}">
<v-text-field
v-model="formattedStartdate" label="Tanggal Awal"
hide-details readonly v-on="on" outline
></v-text-field>
</template>
<v-date-picker
v-model="filter_closed.startdate" no-title
@input="menuStartdateFilter = false"
></v-date-picker>
</v-menu>
</v-flex>
<v-flex xs2 pl-2>
<v-menu
v-model="menuEnddateFilter" offset-y lazy min-width="290px"
transition="scale-transition" max-width="290px" full-width
:nudge-right="40" :close-on-content-click="false"
>
<template v-slot:activator="{on}">
<v-text-field
v-model="formattedEnddate" label="Tanggal Akhir"
hide-details readonly v-on="on" outline
></v-text-field>
</template>
<v-date-picker
v-model="filter_closed.enddate" no-title
@input="menuEnddateFilter = false"
></v-date-picker>
</v-menu>
</v-flex>
<v-flex xs2 pl-2>
<v-autocomplete
:items="list_typejurnal" outline hide-details item-text="JurnalTypeName"
v-model="filter_closed.typeJournalID" item-value="JurnalTypeID" label="Tipe Jurnal"
></v-autocomplete>
</v-flex>
<v-flex xs3 pl-2>
<v-autocomplete
:items="list_periode" outline hide-details item-text="periodeName"
v-model="filter_closed.periodeID" item-value="periodeID" label="Periode"
>
<template slot="item" slot-scope="{item}">
<v-list-tile-content>
<v-list-tile-title>{{ item.periodeName }}</v-list-tile-title>
<v-list-tile-sub-title>
{{ item.periodeStartDate }} - {{ item.periodeEndDate }}
</v-list-tile-sub-title>
</v-list-tile-content>
</template>
</v-autocomplete>
</v-flex>
<v-flex grow pl-2>
<v-text-field
v-model="filter_closed.search" hide-details
label="Cari nomor jurnal" outline
></v-text-field>
</v-flex>
<v-flex shrink pl-2 text-xs-right>
<v-btn
color="info" dark @click="searchJurnal()"
style="min-width: 50px; height: 50px; margin: 0;"
>
<v-icon>search</v-icon>
</v-btn>
</v-flex>
</v-layout>
<v-layout row wrap class="mt-4">
<v-flex xs12>
<v-data-table
:headers="headers" class="elevation-1" hide-actions
:items="list_journal_closed.records"
>
<template slot="items" slot-scope="props">
<tr>
<td class="text-xs-center pa-2">{{ props.item.jurnalDate }}</td>
<td class="text-xs-center pa-2">{{ props.item.jurnalNo }}</td>
<td class="text-xs-center pa-2">{{ props.item.jurnalTitle }}</td>
<td class="text-xs-center pa-2">{{ props.item.jurnalDescription }}</td>
<td class="text-xs-center pa-2">{{ props.item.JurnalTypeName }}</td>
<td class="text-xs-center pa-2">
<v-btn
outline small color="primary"
@click="openDialogJurnalBalik(props.item)"
>
KOREKSI
<v-icon small right dark>assignment_return</v-icon>
</v-btn>
</td>
</tr>
</template>
</v-data-table>
<v-divider class="my-1"></v-divider>
<div class="pa-2 mt-2 text-xs-center">
<v-pagination
v-model="currpage_closed" :length="tablelength"
:total-visible="10"
></v-pagination>
</div>
</v-flex>
</v-layout>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn @click="closeDialogJournal()" color="red" class="white--text">Tutup</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<script>
module.exports = {
data() {
return {
menuStartdateFilter: false,
menuEnddateFilter: false,
headers: [
{
text: "JOURNAL DATE", align: "center", sortable: false,
value: "action", width: "10%", class: "pa-1 blue lighten-3 white--text",
},
{
text: "JOURNAL NO", align: "center", sortable: false,
value: "action", width: "15%", class: "pa-1 blue lighten-3 white--text",
},
{
text: "JOURNAL", align: "center", sortable: false,
value: "action", width: "25%", class: "pa-1 blue lighten-3 white--text",
},
{
text: "JOURNAL DESCRIPTION", align: "center", sortable: false,
value: "action", width: "25%", class: "pa-1 blue lighten-3 white--text",
},
{
text: "JOURNAL TYPE", align: "center", sortable: false,
value: "action", width: "15%", class: "pa-1 blue lighten-3 white--text",
},
{
text: "ACTION", align: "center", sortable: false,
value: "action", width: "10%", class: "pa-1 blue lighten-3 white--text",
}
]
}
},
computed: {
dialog_journal: {
get() {
return this.$store.state.journal.dialog_journal
},
set(val) {
this.$store.commit("journal/update_dialog_journal", val)
}
},
filter_closed: {
get() {
return this.$store.state.journal.filter_closed
},
set(val) {
this.$store.commit("journal/update_filter_closed", val)
}
},
formattedStartdate() {
return this.formatDate(this.filter_closed.startdate)
},
formattedEnddate() {
return this.formatDate(this.filter_closed.enddate)
},
list_typejurnal() {
return this.$store.state.journal.list_typejurnal
},
list_periode() {
return this.$store.state.journal.list_periode
},
list_journal_closed() {
return this.$store.state.journal.list_journal_closed
},
currpage_closed: {
get() {
return this.$store.state.journal.currpage_closed
},
set(val) {
this.$store.commit("journal/update_currpage_closed", val)
this.$store.dispatch("journal/getDaftarJournalClosed")
}
},
tablelength() {
let total = this.list_journal_closed.total
if (total == undefined || total < 1) return 1
return Math.ceil(total/5)
},
},
methods: {
formatDate(date) {
if (!date) return null;
const [year, month, day] = date.split('-');
return `${day}-${month}-${year}`;
},
searchJurnal() {
this.$store.dispatch("journal/getDaftarJournalClosed")
},
closeDialogJournal() {
this.dialog_journal = false
},
openDialogJurnalBalik(jurnal) {
jurnal.detail = []
jurnal.totals = {
total_debit: 0,
total_kredit: 0,
balance: 0,
}
this.$store.commit("journal/update_selected_journal_closed", jurnal)
this.$store.dispatch("journal/getDetailJournalClosed")
this.$store.commit("journal/update_dialog_journal_balik", true)
this.dialog_journal = false
}
},
watch: {
dialog_journal(val) {
if (val) {
this.$nextTick(() => {
this.$store.dispatch("journal/getDaftarJournalClosed")
})
}
}
},
}
</script>

View File

@@ -0,0 +1,91 @@
<template>
<v-dialog v-model="dialog_pick_periode" persistent max-width="35vw">
<v-card>
<v-card-title class="headline grey lighten-2" primary-title>
PILIH PERIODE
</v-card-title>
<v-card-text>
<v-autocomplete
v-model="temp_periode" :items="list_periode"
outline hide-details label="Periode Jurnal"
item-text="periodeName" return-object
>
<template slot="item" slot-scope="{ item }">
<v-list-tile-content>
<v-list-tile-title v-text="item.periodeName"></v-list-tile-title>
<v-list-tile-sub-title>
{{ item.periodeStartDate }} - {{ item.periodeEndDate }}
</v-list-tile-sub-title>
</v-list-tile-content>
</template>
</v-autocomplete>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="error" flat @click="closeDialogPeriode()">TUTUP</v-btn>
<v-btn color="primary" @click="choosePeriode()">PILIH</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<script>
module.exports = {
data() {
return {
temp_periode: {}
}
},
computed: {
list_periode() {
return this.$store.state.journal.list_periode
},
dialog_pick_periode: {
get() {
return this.$store.state.journal.dialog_pick_periode
},
set(val) {
this.$store.commit("journal/update_dialog_pick_periode", val)
}
},
selected_periode: {
get() {
return this.$store.state.journal.selected_periode
},
set(val) {
this.$store.commit("journal/update_selected_periode", val)
}
}
},
methods: {
closeDialogPeriode() {
this.temp_periode = {}
this.dialog_pick_periode = false
},
choosePeriode() {
var periode = this.temp_periode
let filter = this.$store.state.journal.filter_balik
if (!periode || periode.periodeID == '') {
return
}
this.selected_periode = periode
filter.periodeID = periode.periodeID
this.$store.commit("journal/update_filter_balik", filter)
this.temp_periode = {}
this.dialog_pick_periode = false
}
},
watch: {
dialog_pick_periode(val) {
if (val) {
this.$nextTick(() => {
this.temp_periode = this.selected_periode
})
}
}
},
}
</script>

View File

@@ -0,0 +1,193 @@
<template>
<v-dialog v-model="dialog_view_jurnal" persistent width="70vw">
<v-card>
<v-card-title class="headline grey lighten-2" primary-title>
DETAIL JURNAL PENYESUAIAN
</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_balik.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_balik.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_balik.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_balik.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_balik.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_balik.JurnalTypeName }}
</div>
</v-flex>
</v-layout>
<v-layout row wrap mt-3>
<v-flex xs12>
<v-data-table
:headers="headerdetails" class="elevation-1"
:items="journal_detail_balik.transaction" hide-actions
>
<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"> {{ props.item.jurnalTxDescription }}</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(journal_detail_balik.summary.total_debit) }}
</td>
<td class="text-xs-right pa-2 font-weight-bold">
{{ formatCurrency(journal_detail_balik.summary.total_kredit) }}
</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(journal_detail_balik.summary.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()">Tutup</v-btn>
<div v-if="(user_level.M_ApproveLevelID == '1' && user_level.DivisionKodeSurat == 'KEU')
|| Number(user_level.M_ApproveLevelID) >= 2"
>
<v-btn
v-if="selected_journal_balik.jurnalPenyesuaianStatus == 'draft'"
color="primary" dark @click="updateJurnalStatus('verified')"
>Verifikasi</v-btn>
<v-btn
v-if="selected_journal_balik.jurnalPenyesuaianStatus == 'verified'"
color="primary" dark @click="updateJurnalStatus('approved')"
>Approve</v-btn>
</div>
</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_view_jurnal: {
get() {
return this.$store.state.journal.dialog_view_jurnal
},
set(val) {
this.$store.commit("journal/update_dialog_view_jurnal", val)
}
},
selected_journal_balik: {
get() {
return this.$store.state.journal.selected_journal_balik;
},
set(val) {
this.$store.commit("journal/update_selected_journal_balik", val);
},
},
journal_detail_balik: {
get() {
return this.$store.state.journal.journal_detail_balik
},
set(val) {
this.$store.commit("journal/update_journal_detail_balik", val)
}
},
user_level() {
return this.$store.state.journal.user_level
}
},
methods: {
formatCurrency(val) {
const price = parseFloat(val)
const IDR = new Intl.NumberFormat("id-ID", {
style: "currency",
currency: "IDR"
})
return `${IDR.format(price)}`
},
closeEditDialog() {
let detailnull ={
transaction: [],
summary: {
total_debit: 0,
total_kredit: 0,
balance: 0,
}
}
this.journal_detail_balik = detailnull
this.selected_journal_balik = {}
this.dialog_view_jurnal = false
},
updateJurnalStatus(status) {
this.$store.dispatch("journal/updateStatusJurnalKoreksi", status)
}
},
}
</script>

View File

@@ -0,0 +1,287 @@
<template>
<div style="width: 100%;">
<v-toolbar dark class="blue lighten-3 white--text">
<v-toolbar-title class="white--text">JURNAL PENYESUAIAN</v-toolbar-title>
<v-spacer></v-spacer>
</v-toolbar>
<v-card class="pa-2">
<v-layout row align-center>
<v-flex grow>
<span>
<v-chip outline color="red">
{{ selected_periode.periodeStartDate }} - {{ selected_periode.periodeEndDate }}
</v-chip>
</span>
</v-flex>
<v-flex xs2 pl-2>
<v-menu
v-model="menuStartdateFilter" offset-y lazy min-width="290px"
transition="scale-transition" max-width="290px" full-width
:nudge-right="40" :close-on-content-click="false"
>
<template v-slot:activator="{on}">
<v-text-field
v-model="formattedStartdate" label="Tanggal Awal"
hide-details readonly v-on="on" outline
></v-text-field>
</template>
<v-date-picker
v-model="filter_balik.startdate" no-title
@input="menuStartdateFilter = false"
></v-date-picker>
</v-menu>
</v-flex>
<v-flex xs2 pl-2>
<v-menu
v-model="menuEnddateFilter" offset-y lazy min-width="290px"
transition="scale-transition" max-width="290px" full-width
:nudge-right="40" :close-on-content-click="false"
>
<template v-slot:activator="{on}">
<v-text-field
v-model="formattedEnddate" label="Tanggal Akhir"
hide-details readonly v-on="on" outline
></v-text-field>
</template>
<v-date-picker
v-model="filter_balik.enddate" no-title
@input="menuEnddateFilter = false"
></v-date-picker>
</v-menu>
</v-flex>
<v-flex xs2 pl-2>
<v-autocomplete
:items="list_typejurnal" outline hide-details item-text="JurnalTypeName"
v-model="filter_balik.typeJournalID" item-value="JurnalTypeID" label="Tipe Jurnal"
></v-autocomplete>
</v-flex>
<v-flex xs2 pl-2>
<v-text-field
v-model="filter_balik.search" hide-details
label="Cari nomor jurnal" outline
></v-text-field>
</v-flex>
<v-flex shrink pl-2>
<v-btn
color="info" dark @click="searchJurnal()"
style="min-width: 50px; height: 50px; margin: 0;"
>
<v-icon>search</v-icon>
</v-btn>
</v-flex>
<v-flex shrink pl-2>
<v-btn
color="primary" dark @click="addKoreksiJurnal()"
style="min-width: 50px; height: 50px; margin: 0;"
>
<v-icon>add</v-icon>
</v-btn>
</v-flex>
<v-flex text-xs-right>
<v-btn
color="orange" class="white--text"
@click="choosePeriode()"
>
Periode Accounting
</v-btn>
</v-flex>
</v-layout>
</v-card>
<v-card class="pa-2 mt-2">
<v-data-table
:headers="headers" :items="list_journal_balik.records"
class="elevation-1" hide-actions
>
<template slot="items" slot-scope="props">
<tr>
<td class="text-xs-center pa-2">{{ props.item.jurnalDate }}</td>
<td class="text-xs-center pa-2">{{ props.item.jurnalNo }}</td>
<td class="text-xs-center pa-2">{{ props.item.jurnalTitle }}</td>
<td class="text-xs-center pa-2">{{ props.item.jurnalDescription }}</td>
<td class="text-xs-center pa-2">{{ props.item.JurnalTypeName }}</td>
<td class="text-xs-center pa-2">
<v-chip color="info" outline small>
{{ props.item.jurnalPenyesuaianStatus }}
</v-chip>
</td>
<td class="text-xs-center pa-2">
<v-tooltip bottom>
<template v-slot:activator="{ on, attrs }">
<v-btn
outline small color="info"
style="min-width: 50px; margin: 0"
>
<v-icon
v-bind="attrs" v-on="on" color="info"
@click="openDialogJurnalBalik(props.item)"
>visibility</v-icon>
</v-btn>
</template>
<span>Detail</span>
</v-tooltip>
<!-- <v-tooltip bottom v-if="props.item.jurnalPenyesuaianStatus == 'draft'">
<template v-slot:activator="{on, attrs}">
<v-btn
outline small color="primary"
style="min-width: 50px; margin: 0"
>
<v-icon
v-bind="attrs" v-on="on" color="primary"
@click="{}"
>check</v-icon>
</v-btn>
</template>
<span>Verifikasi</span>
</v-tooltip> -->
</td>
</tr>
</template>
</v-data-table>
<v-divider class="my-1"></v-divider>
<div class="pa-2 mt-1 text-xs-center">
<v-pagination v-model="currpage_balik" :length="pagilength" :total-visible="10"></v-pagination>
</div>
</v-card>
<v-snackbar v-model="snackbar.active" multi-line top :timeout="3000" :color="snackbar.color">
{{ snackbar.message }}
<v-btn class="ml-2" round flat @click="snackbar.active = false">Tutup</v-btn>
</v-snackbar>
<dialog-pilih-jurnal></dialog-pilih-jurnal>
<dialog-balik-jurnal></dialog-balik-jurnal>
<dialog-add-jurnaltrx></dialog-add-jurnaltrx>
<dialog-view-jurnal></dialog-view-jurnal>
<dialog-sel-periode></dialog-sel-periode>
</div>
</template>
<script>
module.exports = {
components: {
'dialog-pilih-jurnal': httpVueLoader('./dialogSelectJurnal.vue'),
'dialog-balik-jurnal': httpVueLoader('./dialogBalikJurnal.vue'),
'dialog-add-jurnaltrx': httpVueLoader('./dialogAddRowJurnal.vue'),
'dialog-view-jurnal': httpVueLoader('./dialogViewJurnal.vue'),
'dialog-sel-periode': httpVueLoader('./dialogSelectPeriode.vue')
},
mounted() {
this.$store.dispatch("journal/getUserApproveLevel")
this.$store.dispatch("journal/getDaftarTipeJurnal")
this.$store.dispatch("journal/getDaftarAccount")
this.$store.dispatch("journal/getDaftarPeriode")
.then(() => {
this.$store.dispatch("journal/getDaftarJournalBalik")
})
},
data() {
return {
menuStartdateFilter: false,
menuEnddateFilter: false,
headers: [
{
text: "JOURNAL DATE", align: "center", sortable: false,
value: "action", width: "10%", class: "pa-1 blue lighten-3 white--text",
},
{
text: "JOURNAL NO", align: "center", sortable: false,
value: "action", width: "15%", class: "pa-1 blue lighten-3 white--text",
},
{
text: "JOURNAL", align: "center", sortable: false,
value: "action", width: "25%", class: "pa-1 blue lighten-3 white--text",
},
{
text: "JOURNAL DESCRIPTION", align: "center", sortable: false,
value: "action", width: "25%", class: "pa-1 blue lighten-3 white--text",
},
{
text: "JOURNAL TYPE", align: "center", sortable: false,
value: "action", width: "10%", class: "pa-1 blue lighten-3 white--text",
},
{
text: "JOURNAL TYPE", align: "center", sortable: false,
value: "action", width: "5%", class: "pa-1 blue lighten-3 white--text",
},
{
text: "ACTION", align: "center", sortable: false,
value: "action", width: "10%", class: "pa-1 blue lighten-3 white--text",
}
]
}
},
computed: {
filter_balik: {
get() {
return this.$store.state.journal.filter_balik
},
set(val) {
this.$store.commit("journal/update_filter_balik", val)
}
},
formattedStartdate() {
return this.formatDate(this.filter_balik.startdate)
},
formattedEnddate() {
return this.formatDate(this.filter_balik.enddate)
},
list_typejurnal() {
return this.$store.state.journal.list_typejurnal
},
list_periode() {
return this.$store.state.journal.list_periode
},
selected_periode() {
return this.$store.state.journal.selected_periode
},
list_journal_balik() {
return this.$store.state.journal.list_journal_balik
},
currpage_balik: {
get() {
return this.$store.state.journal.currpage_balik
},
set(val) {
this.$store.commit("journal/update_currpage_balik", val)
this.$store.dispatch("journal/getDaftarJournalBalik")
}
},
pagilength() {
let total = this.list_journal_balik.total
if (total == undefined || total < 1) return 1
return Math.ceil(total/10)
},
snackbar: {
get() {
return this.$store.state.journal.snackbar
},
set(val) {
this.$store.commit("journal/update_snackbar", val)
}
}
},
methods: {
formatDate(date) {
if (!date) return null;
const [year, month, day] = date.split('-');
return `${day}-${month}-${year}`;
},
addKoreksiJurnal() {
this.$store.commit("journal/update_dialog_journal", true)
},
searchJurnal() {
this.$store.dispatch("journal/getDaftarJournalBalik")
},
choosePeriode() {
this.$store.commit("journal/update_dialog_pick_periode", true)
},
openDialogJurnalBalik(item) {
this.$store.commit("journal/update_selected_journal_balik", item)
this.$store.dispatch("journal/getDetailJournalBalik")
this.$store.commit("journal/update_dialog_view_jurnal", true)
}
},
}
</script>