Skip to content

Commit

Permalink
Feature/update with experimental 3.1.3 (adempiere#1508)
Browse files Browse the repository at this point in the history
* feat: Accouting Dimentarions (adempiere#1474)

* feat: Accouting viewer as form.

* add accouting dimentions.

* add action footer.

* add filter accouting columns.

* fix table column width

* implement on window.

* feat: POS Support Document Type (adempiere#1487)

* Support Document Type

* change `dialogo` to `dialog` word.

---------

Co-authored-by: Edwin Betancourt <EdwinBetanc0urt@outlook.com>

* feat: Add `Accouting Viewer` on menu validate by role. (adempiere#1488)

* feat: Add `Accouting Viewer` on menu.

* remove unused const.

* Fix: POS Error Creating Sales Order With Document Type (adempiere#1496)

* Fix: POS Disable Total Payment Field (adempiere#1497)

* feat: Tab web browser favicon and title. (adempiere#1502)

* feat: Calendar View static. (adempiere#1503)

* feat: Run process with `Smart Browser ID`. (adempiere#1505)

* Feat: Todo List dashboard (adempiere#1506)

* Todo LIst

* Add translations

* Update index.vue

---------

Co-authored-by: Edwin Betancourt <EdwinBetanc0urt@outlook.com>

* Fix: Sytle Height Footer (adempiere#1507)

* Fix: Sytle Height Footer

* minimal changes

* minimal changes

---------

Co-authored-by: Elsio Sanchez <45974454+elsiosanchez@users.noreply.github.com>
  • Loading branch information
EdwinBetanc0urt and elsiosanchez authored Oct 5, 2023
1 parent 9b4fd94 commit 3750d5e
Show file tree
Hide file tree
Showing 59 changed files with 2,674 additions and 1,176 deletions.
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
"test:ci": "yarn lint && yarn test:unit"
},
"dependencies": {
"@fullcalendar/core": "^6.1.9",
"@fullcalendar/daygrid": "^6.1.9",
"@fullcalendar/interaction": "^6.1.9",
"@fullcalendar/list": "^6.1.9",
"@fullcalendar/timegrid": "^6.1.9",
"@fullcalendar/vue": "^6.1.9",
"@kangc/v-md-editor": "^1.7.11",
"@toast-ui/editor-plugin-chart": "^3.0.1",
"@toast-ui/vue-editor": "3.2.3",
Expand Down
122 changes: 61 additions & 61 deletions src/api/ADempiere/form/accouting.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution
* Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A. www.erpya.com
* Copyright (C) 2018-Present E.R.P. Consultores y Asociados, C.A. www.erpya.com
* Contributor(s): Elsio Sanchez elsiosanches@gmail.com https://github.com/elsiosanchez
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand All @@ -23,6 +23,66 @@ import { camelizeObjectKeys } from '@/utils/ADempiere/transformObject.js'
// Constants
import { ROWS_OF_RECORDS_BY_PAGE } from '@/utils/ADempiere/tableUtils'

export function requestListAccoutingSchemas({
searchValue,
pageToken,
pageSize = 100
}) {
return request({
url: '/general-ledger/accounting-schemas',
method: 'get',
params: {
page_size: pageSize,
page_token: pageToken,
// DSL Query
search_value: searchValue
}
})
.then(response => {
return camelizeObjectKeys(response)
})
}

export function requestListOrganizations({
searchValue,
pageToken,
pageSize = 100
}) {
return request({
url: '/general-ledger/organizations',
method: 'get',
params: {
page_size: pageSize,
page_token: pageToken,
// DSL Query
search_value: searchValue
}
})
.then(response => {
return camelizeObjectKeys(response)
})
}

export function requestPostingTypesList({
searchValue,
pageToken,
pageSize = 100
}) {
return request({
url: '/general-ledger/posting-types',
method: 'get',
params: {
page_size: pageSize,
page_token: pageToken,
// DSL Query
search_value: searchValue
}
})
.then(response => {
return camelizeObjectKeys(response)
})
}

export function requestAccountingFacts({
tableName,
recordId,
Expand Down Expand Up @@ -94,63 +154,3 @@ export function requestStartRePost({
return camelizeObjectKeys(response)
})
}

export function listAccoutingSchemasRequest({
searchValue,
pageToken,
pageSize = 100
}) {
return request({
url: '/general-ledger/accounting-schemas',
method: 'get',
params: {
page_size: pageSize,
page_token: pageToken,
// DSL Query
search_value: searchValue
}
})
.then(response => {
return camelizeObjectKeys(response)
})
}

export function listPostingTypesRequest({
searchValue,
pageToken,
pageSize = 100
}) {
return request({
url: '/general-ledger/posting-types',
method: 'get',
params: {
page_size: pageSize,
page_token: pageToken,
// DSL Query
search_value: searchValue
}
})
.then(response => {
return camelizeObjectKeys(response)
})
}

export function listOrganizationsRequest({
searchValue,
pageToken,
pageSize = 100
}) {
return request({
url: '/general-ledger/list-organizations',
method: 'get',
params: {
page_size: pageSize,
page_token: pageToken,
// DSL Query
search_value: searchValue
}
})
.then(response => {
return camelizeObjectKeys(response)
})
}
2 changes: 2 additions & 0 deletions src/api/ADempiere/form/point-of-sales.js
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,7 @@ export function createPayment({
chargeUuid,
isRefund,
currencyUuid,
invoiceReferenceId,
collectingAgentUuid,
customerBankAccountUuid,
referenceBankAccountUuid
Expand All @@ -646,6 +647,7 @@ export function createPayment({
tender_type_code: tenderTypeCode,
payment_method_uuid: paymentMethodUuid,
is_refund: isRefund,
invoice_reference_id: invoiceReferenceId,
currency_uuid: currencyUuid,
collecting_agent_uuid: collectingAgentUuid,
reference_bank_account_uuid: referenceBankAccountUuid,
Expand Down
16 changes: 10 additions & 6 deletions src/api/ADempiere/process.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution
* Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A. www.erpya.com
* Copyright (C) 2018-Present E.R.P. Consultores y Asociados, C.A. www.erpya.com
* Contributor(s): Edwin Betancourt EdwinBetanc0urt@outlook.com https://github.com/EdwinBetanc0urt
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -41,12 +41,14 @@ import { ROWS_OF_RECORDS_BY_PAGE } from '@/utils/ADempiere/tableUtils'
export function requestRunProcess({
id,
uuid,
parametersList = [],
// window
tableName,
recordId,
recordUuid,
parametersList = [],
selectionsList = [],
tableSelectedId
// browse
browserId,
selectionsList = []
}) {
parametersList = parametersList.map(parameter => {
return {
Expand All @@ -61,11 +63,13 @@ export function requestRunProcess({
data: {
id,
uuid,
parameters: parametersList,
//
table_name: tableName,
record_id: recordId,
record_uuid: recordUuid,
table_selected_id: tableSelectedId,
parameters: parametersList,
//
browser_id: browserId,
selections: selectionsList
}
})
Expand Down
176 changes: 176 additions & 0 deletions src/components/ADempiere/Form/AcctViewer/ActionsFooter/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
<!--
ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution
Copyright (C) 2018-Present E.R.P. Consultores y Asociados, C.A. www.erpya.com
Contributor(s): Edwin Betancourt EdwinBetanc0urt@outlook.com https://github.com/EdwinBetanc0urt
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https:www.gnu.org/licenses/>.
-->

<template>
<div style="margin-top: 10px;">
<el-button
:loading="isLoadingDataTable"
type="success"
class="button-base-icon"
icon="el-icon-refresh-right"
style="margin-top: 10px;float: right;"
@click="refreshAccount"
/>

<el-button
plain
type="primary"
class="button-base-icon"
icon="el-icon-download"
style="margin-top: 10px;margin-right: 10px;float: right;"
@click="exportAccounting"
/>

<el-button
type="primary"
plain
style="margin-right: 10px; !important"
:loading="isLoadingRePost"
:disabled="isLoadingRePost"
@click="rePost"
>
{{ $t('form.accountingViewer.rePosAccounting') }}
</el-button>

<el-checkbox
v-model="force"
>
{{ $t('form.accountingViewer.force') }}
</el-checkbox>
</div>
</template>

<script>
import { defineComponent, ref } from '@vue/composition-api'
import store from '@/store'
import {
requestStartRePost
} from '@/api/ADempiere/form/accouting.js'
// Utils and Helper Methods
import { isEmptyValue } from '@/utils/ADempiere/valueUtils.js'
import { showMessage } from '@/utils/ADempiere/notification'
// import { parseTime } from '@/utils'
// import { exportFileFromJson } from '@/utils/ADempiere/exportUtil.js'
export default defineComponent({
name: 'ActionsFooter',
props: {
tableName: {
type: String,
default: () => ''
},
recordId: {
type: Number,
default: () => 0
},
recordUuid: {
type: String,
default: () => ''
}
},
setup(props) {
const isLoadingDataTable = ref(false)
const isLoadingRePost = ref(false)
const force = ref(false)
// const accountingShemaId = computed(() => {
// return store.getters.getCurrentStoredAccoutingSchemaId
// })
// const accountingShemasList = computed(() => {
// return store.getters.getStoredAccoutingShemasList
// })
// function formatJson(filterVal, jsonData) {
// return jsonData.map(v => filterVal.map(j => {
// if (j === 'timestamp') {
// return parseTime(v[j])
// } else {
// return v[j]
// }
// }))
// }
function exportAccounting() {
// const fileName = accountingShemasList.value.find(acctSchema => {
// return acctSchema.KeyColumn === accountingShemaId.value
// }).DisplayColumn
// exportFileFromJson({
// header: headerAccounting.value.map(a => a.label),
// data: formatJson(
// headerAccounting.value.map(a => a.columnName),
// tableData.value
// ),
// fileName,
// bookType: 'xlsx'
// })
}
function refreshAccount() {
store.dispatch('getAccoutingFactsFromServer', {
searchValue: '',
tableName: props.tableName,
recordUuid: props.recordUuid,
recordId: props.recordId
})
}
function rePost() {
isLoadingRePost.value = true
requestStartRePost({
tableName: props.tableName,
recordId: props.recordId,
recordUuid: props.recordUuid,
isForce: force.value
})
.then(response => {
if (!isEmptyValue(response.errorMsg)) {
showMessage({
message: response.errorMsg,
type: 'error'
})
}
})
.catch(error => {
console.warn(`LookupFactory: Get Start Re-Post Facts From Server (State) - Error ${error.code}: ${error.message}.`)
})
.finally(() => {
isLoadingRePost.value = false
store.dispatch('getAccoutingFactsFromServer', {
searchValue: ''
})
})
}
return {
isLoadingDataTable,
isLoadingRePost,
force,
exportAccounting,
refreshAccount,
rePost
}
}
})
</script>
Loading

0 comments on commit 3750d5e

Please sign in to comment.