Commit a2692ed4 authored by Riri Novita's avatar Riri Novita

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

parents d24dd39d d558a09a
......@@ -330,7 +330,11 @@ export default class CorporateAnnualTargetMR extends Component {
})
}
<<<<<<< HEAD
downloadTemplate = async () => {
=======
downloadTemplate = async () => {
>>>>>>> d558a09ad0e1b021fb47b356a08dd4362fa29f4d
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}&&year=${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=${this.props.periode}`
......
......@@ -181,7 +181,7 @@ export default class CorporateAnnualTargetRO extends Component {
}
}
res.map((item, index) => {
let weight = String(item.corporate_annual_target.weight).substr(0, String(item.corporate_annual_target.weight).length - 1)
let weight = String(item.corporate_annual_target.weight).includes('%')? String(item.corporate_annual_target.weight).substr(0, String(item.corporate_annual_target.weight).length - 1) : item.corporate_annual_target.weight
dataTable.push([
item.type_report_id,
item.id,
......@@ -190,7 +190,7 @@ export default class CorporateAnnualTargetRO extends Component {
item.level,
item.description,
// item.weight == '' ? Number(0).toFixed(1) : Number(Number(item.weight) * 100).toFixed(1),
item.corporate_annual_target.weight == "" ? Number(0).toFixed(1) : Number(weight).toFixed(1),
item.corporate_annual_target.weight == "" ? Number(0).toFixed(1) : Number(Number(weight * 100)).toFixed(1),
item.corporate_annual_target.uom,
item.kpi_type == "" ? null : { value: item.kpi_type },
item.max_ach == "" ? null : { value: titleCase(item.max_ach) },
......
......@@ -352,7 +352,7 @@ export default class TaxPlanning extends Component {
june: {
tbc: i[1] === 3 && i[14].tbc === "" ? "0" : i[1] === 5 || i[1] === 6 || i[1] === 7 ? String(i[14].tbc.value) : String(i[14].tbc),
fcp: i[2] === 3 && i[14].fcp === "" ? "0" : i[2] === 5 || i[2] === 6 || i[2] === 7 ? String(i[14].fcp.value) : String(i[14].fcp),
tbf: i[3] === 3 && i[14].tbc === "" ? "0" : i[3] === 5 || i[3] === 6 || i[3] === 7 ? String(i[14].tbf.value) : String(i[14].tbf)
tbf: i[3] === 3 && i[14].tbf === "" ? "0" : i[3] === 5 || i[3] === 6 || i[3] === 7 ? String(i[14].tbf.value) : String(i[14].tbf)
},
july: {
tbc: i[1] === 3 && i[15].tbc === "" ? "0" : i[1] === 5 || i[1] === 6 || i[1] === 7 ? String(i[15].tbc.value) : String(i[15].tbc),
......
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