Commit 0770580a authored by Riri Novita's avatar Riri Novita

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into riri

parents 1d230595 997fb4ce
...@@ -259,6 +259,7 @@ const create = (type = "") => { ...@@ -259,6 +259,7 @@ const create = (type = "") => {
const getHierarkiMontlyReportTP = (body) => api.post('transaction/monthly_report_tp/get_report_hierarki', body) const getHierarkiMontlyReportTP = (body) => api.post('transaction/monthly_report_tp/get_report_hierarki', body)
const getHierarkiMontlyReportLOCF = (body) => api.post('transaction/monthly_report_locf/get_report_hierarki', body) const getHierarkiMontlyReportLOCF = (body) => api.post('transaction/monthly_report_locf/get_report_hierarki', body)
const getHierarkiMontlyReportFAM = (body) => api.post('transaction/monthly_report/fam/get_report_hierarki', body) const getHierarkiMontlyReportFAM = (body) => api.post('transaction/monthly_report/fam/get_report_hierarki', body)
const getHierarkiMontlyReportCF = (body) => api.post('transaction/monthly_report_cf/get_report_hierarki', body)
const getHierarkiMontlyReportCAT = (body) => api.post('/transaction/monthly_report/cat/get_report_hierarki', body) const getHierarkiMontlyReportCAT = (body) => api.post('/transaction/monthly_report/cat/get_report_hierarki', body)
const getLastPeriodMonthly = (idCompany) => api.get(`transaction/monthly_report/get_last_periode/${idCompany}`) const getLastPeriodMonthly = (idCompany) => api.get(`transaction/monthly_report/get_last_periode/${idCompany}`)
const checkApproverMonthly = () => api.get('transaction/monthly_report/is_approver') const checkApproverMonthly = () => api.get('transaction/monthly_report/is_approver')
...@@ -498,7 +499,8 @@ const create = (type = "") => { ...@@ -498,7 +499,8 @@ const create = (type = "") => {
checkUploadMonthlyReportBS, checkUploadMonthlyReportBS,
uploadMonthlyReportBS, uploadMonthlyReportBS,
uploadMonthlyReportFAM, uploadMonthlyReportFAM,
uploadMonthlyReportTP uploadMonthlyReportTP,
getHierarkiMontlyReportCF
} }
} }
......
...@@ -2256,11 +2256,11 @@ export default class FixedAssetsMovement extends Component { ...@@ -2256,11 +2256,11 @@ export default class FixedAssetsMovement extends Component {
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(value).toFixed(1)} value={Number(handleTotal(tableMeta)).toFixed(1)}
/> />
} }
/> />
...@@ -2290,16 +2290,16 @@ export default class FixedAssetsMovement extends Component { ...@@ -2290,16 +2290,16 @@ export default class FixedAssetsMovement extends Component {
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
disabled={this.props.isApprover ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={true}
value={Number(value).toFixed(1)} value={Number(handleTotal(tableMeta)).toFixed(1)}
onBlur={(event) => { // onBlur={(event) => {
// updateValue(event.target.value) // // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) // handleChange(event.target.value, tableMeta)
// // console.log(dataTable2) // // // console.log(dataTable2)
}} // }}
/> />
} }
/> />
......
...@@ -520,9 +520,11 @@ export default class BalanceSheetMR extends Component { ...@@ -520,9 +520,11 @@ export default class BalanceSheetMR extends Component {
if (String(item).includes('#')) { if (String(item).includes('#')) {
if (String(item).includes('[M-1]')) { if (String(item).includes('[M-1]')) {
let tst = String(item).replace('[M-1]', '') let tst = String(item).replace('[M-1]', '')
let indexID = dataTable2.findIndex((val) => val[21] == tst) // let indexID = dataTable2.findIndex((val) => val[21] == tst)
let data = tableMeta.rowData[20]
let indexID = data.findIndex((val) => val.item_formula == String(`@${item}`))
if (indexID !== -1) { if (indexID !== -1) {
let valuezz = dataTable2[indexID][9] let valuezz = data[indexID].value
anjay.push(valuezz == "" ? 0 : valuezz) anjay.push(valuezz == "" ? 0 : valuezz)
} }
} else { } else {
...@@ -584,9 +586,11 @@ export default class BalanceSheetMR extends Component { ...@@ -584,9 +586,11 @@ export default class BalanceSheetMR extends Component {
let totalPrio = 0 let totalPrio = 0
let optPrio = "" let optPrio = ""
let prio = false let prio = false
let optPrev = ""
anjay2.map((item, index) => { anjay2.map((item, index) => {
if (Array.isArray(item)) { if (Array.isArray(item)) {
prio = true prio = true
optPrev = opt
item.map((items, indexs) => { item.map((items, indexs) => {
if (items == "+") { if (items == "+") {
optPrio = "tambah" optPrio = "tambah"
...@@ -628,7 +632,17 @@ export default class BalanceSheetMR extends Component { ...@@ -628,7 +632,17 @@ export default class BalanceSheetMR extends Component {
if (item == "+") { if (item == "+") {
opt = "tambah" opt = "tambah"
if (prio) { if (prio) {
total = Number(Number(totalPrio) + Number(total)) if (optPrev == "tambah") {
total = Number(total) + Number(totalPrio)
} else if (optPrev == "kurang") {
total = Number(total) - Number(totalPrio)
} else if (optPrev == "kali") {
total = Number(total) * Number(totalPrio)
} else if (optPrev == "bagi") {
total = Number(total) / Number(totalPrio) == NaN ? 0 : Number(total) / Number(totalPrio)
} else {
total += Number(totalPrio)
}
prio = false prio = false
totalPrio = 0 totalPrio = 0
optPrio = "" optPrio = ""
...@@ -636,7 +650,17 @@ export default class BalanceSheetMR extends Component { ...@@ -636,7 +650,17 @@ export default class BalanceSheetMR extends Component {
} else if (item == "-") { } else if (item == "-") {
opt = "kurang" opt = "kurang"
if (prio) { if (prio) {
total = Number(Number(totalPrio) + Number(total)) if (optPrev == "tambah") {
total = Number(total) + Number(totalPrio)
} else if (optPrev == "kurang") {
total = Number(total) - Number(totalPrio)
} else if (optPrev == "kali") {
total = Number(total) * Number(totalPrio)
} else if (optPrev == "bagi") {
total = Number(total) / Number(totalPrio) == NaN ? 0 : Number(total) / Number(totalPrio)
} else {
total += Number(totalPrio)
}
prio = false prio = false
totalPrio = 0 totalPrio = 0
optPrio = "" optPrio = ""
...@@ -644,7 +668,17 @@ export default class BalanceSheetMR extends Component { ...@@ -644,7 +668,17 @@ export default class BalanceSheetMR extends Component {
} else if (item == "*") { } else if (item == "*") {
opt = "kali" opt = "kali"
if (prio) { if (prio) {
total = Number(Number(totalPrio) + Number(total)) if (optPrev == "tambah") {
total = Number(total) + Number(totalPrio)
} else if (optPrev == "kurang") {
total = Number(total) - Number(totalPrio)
} else if (optPrev == "kali") {
total = Number(total) * Number(totalPrio)
} else if (optPrev == "bagi") {
total = Number(total) / Number(totalPrio) == NaN ? 0 : Number(total) / Number(totalPrio)
} else {
total += Number(totalPrio)
}
prio = false prio = false
totalPrio = 0 totalPrio = 0
optPrio = "" optPrio = ""
...@@ -652,7 +686,17 @@ export default class BalanceSheetMR extends Component { ...@@ -652,7 +686,17 @@ export default class BalanceSheetMR extends Component {
} else if (item == "/") { } else if (item == "/") {
opt = "bagi" opt = "bagi"
if (prio) { if (prio) {
total = Number(Number(totalPrio) + Number(total)) if (optPrev == "tambah") {
total = Number(total) + Number(totalPrio)
} else if (optPrev == "kurang") {
total = Number(total) - Number(totalPrio)
} else if (optPrev == "kali") {
total = Number(total) * Number(totalPrio)
} else if (optPrev == "bagi") {
total = Number(total) / Number(totalPrio) == NaN ? 0 : Number(total) / Number(totalPrio)
} else {
total += Number(totalPrio)
}
prio = false prio = false
totalPrio = 0 totalPrio = 0
optPrio = "" optPrio = ""
......
This diff is collapsed.
...@@ -680,7 +680,7 @@ export default class ProfitLossMR extends Component { ...@@ -680,7 +680,7 @@ export default class ProfitLossMR extends Component {
} }
} }
}, { }, {
name: "Rolling Outlook (FY 2021)", name: `Rolling Outlook (FY ${this.props.periode})`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#07a7d0', width: 96, borderLeft: '1px #fff solid', borderRight: '1px #fff solid' }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#07a7d0', width: 96, borderLeft: '1px #fff solid', borderRight: '1px #fff solid' }}>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment