Commit e8e72a40 authored by Riri Novita's avatar Riri Novita

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

parents 89aeefde 7fef07b6
......@@ -2575,7 +2575,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`)).toFixed(1)}
value={Number(handleForecast(tableMeta, `${Number(this.props.periode) + 2}`)).toFixed(1)}
/>
:
tableMeta.rowData[0] === 1 ?
......
......@@ -218,7 +218,7 @@ export default class TaxPlanning extends Component {
}
}
})
// console.log(dataTable)
console.log(dataTable)
this.setState({ dataTable, loading: false, buttonError: true, editable: true })
} else {
this.setState({ loading: false, alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
......@@ -355,6 +355,7 @@ export default class TaxPlanning extends Component {
"tax_planning": data
}
// console.log(payload);
// console.log(JSON.stringify(data))
this.props.saveToMasterBudget(payload)
this.props.onClickClose()
}
......@@ -7559,7 +7560,7 @@ export default class TaxPlanning extends Component {
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? 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)}
value={Number(handleNewFormula(tableMeta, 3, "@11-@13-@35+@53+@60")).toFixed(1)}
value={this.props.status === 'CLOSED' ? Number(value).toFixed(1) : Number(handleNewFormula(tableMeta, 3, "@11-@13-@35+@53+@60")).toFixed(1)}
/>
}
/>
......@@ -7577,7 +7578,7 @@ export default class TaxPlanning extends Component {
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? 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)}
value={Number(handleNewFormula(tableMeta, 3, "@77-@81")).toFixed(1)}
value={this.props.status === 'CLOSED' ? Number(value).toFixed(1) : Number(handleNewFormula(tableMeta, 3, "@77-@81")).toFixed(1)}
/>
}
/>
......@@ -7595,7 +7596,7 @@ export default class TaxPlanning extends Component {
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? 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)}
value={Number(handleNewFormula(tableMeta, 3, "@83*@87#TP2")).toFixed(2)}
value={this.props.status === 'CLOSED' ? Number(value).toFixed(2) : Number(handleNewFormula(tableMeta, 3, "@83*@87#TP2")).toFixed(2)}
/>
}
/>
......@@ -7613,7 +7614,7 @@ export default class TaxPlanning extends Component {
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? 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)}
value={Number(handleNewFormula(tableMeta, 3, "@87+@88")).toFixed(1)}
value={this.props.status === 'CLOSED' ? Number(value).toFixed(1) : Number(handleNewFormula(tableMeta, 3, "@87+@88")).toFixed(1)}
/>
}
/>
......@@ -7631,21 +7632,21 @@ export default class TaxPlanning extends Component {
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? 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)}
value={Number(handleNewFormula(tableMeta, 3, "@89-(@92+@93+@94+@95)")).toFixed(1)}
value={this.props.status === 'CLOSED' ? Number(value).toFixed(1) : Number(handleNewFormula(tableMeta, 3, "@89-(@92+@93+@94+@95)")).toFixed(1)}
/>
}
/>
</div>
:
tableMeta.rowData[8] === "Control (should be nil)" ?
(Number(handleTotalControl(tableMeta, 1, this.props.periode)).toFixed(1) >= Number(this.state.minValue) && Number(handleTotalControl(tableMeta, 1, this.props.periode)).toFixed(1) <= Number(this.state.maxValue)) ?
(Number(this.props.status === 'CLOSED' ? Number(value).toFixed(1) : handleTotalControl(tableMeta, 1, this.props.periode).toFixed(1)) >= Number(this.state.minValue) && Number(this.props.status === 'CLOSED' ? Number(value).toFixed(1) : handleTotalControl(tableMeta, 1, this.props.periode).toFixed(1)) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{ color: 'black', fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleTotalControl(tableMeta, 1, this.props.periode)).toFixed(1)}
value={this.props.status === 'CLOSED' ? Number(value).toFixed(1) : Number(handleTotalControl(tableMeta, 1, this.props.periode)).toFixed(1)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be 0` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -7654,7 +7655,7 @@ export default class TaxPlanning extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleTotalControl(tableMeta, 1, this.props.periode)).toFixed(1)}
value={this.props.status === 'CLOSED' ? Number(value).toFixed(1) : Number(handleTotalControl(tableMeta, 1, this.props.periode)).toFixed(1)}
/>
</LightTooltip>
:
......@@ -7665,7 +7666,7 @@ export default class TaxPlanning extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleTotal(tableMeta, 1)).toFixed(1)}
value={this.props.status === 'CLOSED' ? Number(value).toFixed(1) : Number(handleTotal(tableMeta, 1)).toFixed(1)}
/>
:
tableMeta.rowData[3] === 3 ?
......@@ -7680,7 +7681,7 @@ export default class TaxPlanning extends Component {
type="text"
placeholder="input"
disabled={this.props.isApprover == true ? 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)}
value={Number(handleTotal(tableMeta, 3)).toFixed(1)}
value={this.props.status === 'CLOSED' ? Number(value).toFixed(1) : Number(handleTotal(tableMeta, 3)).toFixed(1)}
/>
}
/>
......@@ -7693,7 +7694,7 @@ export default class TaxPlanning extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleTotal(tableMeta, 2)).toFixed(1)}
value={this.props.status === 'CLOSED' ? Number(value).toFixed(1) : Number(handleTotal(tableMeta, 2)).toFixed(1)}
/>
</span>
:
......@@ -7707,7 +7708,7 @@ export default class TaxPlanning extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleTotal(tableMeta, 6)).toFixed(1)}
value={this.props.status === 'CLOSED' ? Number(value).toFixed(1) : Number(handleTotal(tableMeta, 6)).toFixed(1)}
/>
:
tableMeta.rowData[3] === 5 ?
......@@ -7717,21 +7718,21 @@ export default class TaxPlanning extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleTotal(tableMeta, 5)).toFixed(1)}
value={this.props.status === 'CLOSED' ? Number(value).toFixed(1) : Number(handleTotal(tableMeta, 5)).toFixed(1)}
/>
:
tableMeta.rowData[3] === 1 ?
null
:
tableMeta.rowData[3] === 7 ?
(Number(handleTotal(tableMeta, 1)) >= Number(this.state.minValue) && Number(handleTotal(tableMeta, 1)) <= Number(this.state.maxValue)) ?
(Number(this.props.status === 'CLOSED' ? Number(value).toFixed(1) : handleTotal(tableMeta, 1)) >= Number(this.state.minValue) && Number(this.props.status === 'CLOSED' ? Number(value).toFixed(1) : handleTotal(tableMeta, 1)) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleTotal(tableMeta, 1, this.props.periode)).toFixed(1)}
value={this.props.status === 'CLOSED' ? Number(value).toFixed(1) : Number(handleTotal(tableMeta, 1, this.props.periode)).toFixed(1)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be 0` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......
......@@ -576,14 +576,14 @@ export default class BalanceSheetMR extends Component {
// // console.log(i);
// err = true
// } else
if ( i[18] === "" && (Number(i[14]) < this.state.minValue || Number(i[14]) > this.state.maxValue)) {
if ( i[18] === "" && (Number(i[14]).toFixed(1) < this.state.minValue || Number(i[14]).toFixed(1) > this.state.maxValue)) {
console.log('msk 2');
err = true
}
}
if (String(i[5]) == "Control (should be nil)") {
if (Number(i[9]) < this.state.minValue || Number(i[9]) > this.state.maxValue ) {
if (Number(i[9]).toFixed(1) < this.state.minValue || Number(i[9]).toFixed(1) > this.state.maxValue ) {
errorContrl = true
editAble = true
}
......
......@@ -212,6 +212,7 @@ export default class CorporateAnnualTargetMR extends Component {
if (indexIDzz === -1) {
let parentTrue = item.parent_name == 'INTERNAL BUSINESS PROCESS PERSPECTIVE' || item.parent_name == 'CUSTOMER PERSPECTIVE'
let weight = String(item.weight).substr(0, String(item.weight).length - 1)
let weightTB = String(item.corporate_annual_target.weight).substr(0, String(item.corporate_annual_target.weight).length - 1)
// console.log(weight)
dataTable.push([
item.type_report_id,
......@@ -221,7 +222,7 @@ export default class CorporateAnnualTargetMR extends Component {
item.level,
item.description,
// item.corporate_annual_target.weight == "" ? Number(0).toFixed(1) : Number(weight).toFixed(1),
parentTrue ? weight : item.corporate_annual_target.weight,
parentTrue ? weight : weightTB,
parentTrue ? item.corporate_annual_target.uom : item.uom,
parentTrue ? item.corporate_annual_target.jenis_kpi == "" ? null : item.corporate_annual_target.jenis_kpi : item.jenis_kpi == "" ? null : item.kpi_type,
// parentTrue ? item.corporate_annual_target.kpi_type == "" ? null : { value: item.corporate_annual_target.kpi_type } : item.kpi_type == "" ? null : { value: item.kpi_type },
......@@ -330,8 +331,9 @@ export default class CorporateAnnualTargetMR extends Component {
}
downloadTemplate = async () => {
console.log(`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cat/monthly_report/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&${this.props.periode}`)
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cat/monthly_report/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=2021`
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cat/monthly_report/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&${this.props.periode}`
)
console.log(res);
res = await res.blob()
......@@ -417,7 +419,7 @@ export default class CorporateAnnualTargetMR extends Component {
item.formula,
item.level,
item.item_report,
String(item.weight).includes("%") ? String(item.weight).substr(0, String(item.weight).length - 1) : item.weight,
String(item.weight).includes("%") ? String(item.weight).trim().substr(0, String(item.weight).trim().length - 1) : item.weight,
item.uom,
item.jenis_kpi,
item.max_ach,
......
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