Commit cb751107 authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'faisal' into 'master'

update fam 280920 sore

See merge request !380
parents 38830578 690ad270
...@@ -118,7 +118,8 @@ export default class FixedAssetsMovement extends Component { ...@@ -118,7 +118,8 @@ export default class FixedAssetsMovement extends Component {
item.fixed_asset_movement.december, item.fixed_asset_movement.december,
item.fixed_asset_movement.total_current_year, item.fixed_asset_movement.total_current_year,
item.fixed_asset_movement.total_next_year, item.fixed_asset_movement.total_next_year,
item.fixed_asset_movement.total_more_year item.fixed_asset_movement.total_more_year,
item.order
]) ])
} }
if (item.children !== null) { if (item.children !== null) {
...@@ -152,7 +153,8 @@ export default class FixedAssetsMovement extends Component { ...@@ -152,7 +153,8 @@ export default class FixedAssetsMovement extends Component {
item.fixed_asset_movement.december, item.fixed_asset_movement.december,
item.fixed_asset_movement.total_current_year, item.fixed_asset_movement.total_current_year,
item.fixed_asset_movement.total_next_year, item.fixed_asset_movement.total_next_year,
item.fixed_asset_movement.total_more_year item.fixed_asset_movement.total_more_year,
item.order
]) ])
if (item.children !== null) { if (item.children !== null) {
if (item.children.length > 0) { if (item.children.length > 0) {
...@@ -329,6 +331,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -329,6 +331,7 @@ export default class FixedAssetsMovement extends Component {
item.total_current_year, item.total_current_year,
item.total_next_year, item.total_next_year,
item.total_more_year, item.total_more_year,
item.order,
item.error item.error
] ]
}) })
...@@ -346,7 +349,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -346,7 +349,7 @@ export default class FixedAssetsMovement extends Component {
}) })
} }
uploadFAM() { uploadFAM(type) {
let data = [] let data = []
this.state.dataTable.map(i => { this.state.dataTable.map(i => {
data.push({ data.push({
...@@ -374,7 +377,8 @@ export default class FixedAssetsMovement extends Component { ...@@ -374,7 +377,8 @@ export default class FixedAssetsMovement extends Component {
company_id: this.props.company.company_id, company_id: this.props.company.company_id,
periode: this.props.periode, periode: this.props.periode,
report_id: this.props.report_id, report_id: this.props.report_id,
fixed_asset_movement: data fixed_asset_movement: data,
status: type
} }
console.log(data); console.log(data);
api.create('UPLOAD').uploadMasterBudget(body).then(response => { api.create('UPLOAD').uploadMasterBudget(body).then(response => {
...@@ -533,7 +537,14 @@ export default class FixedAssetsMovement extends Component { ...@@ -533,7 +537,14 @@ export default class FixedAssetsMovement extends Component {
"formula": rilFormula "formula": rilFormula
} }
api.create().countingFormula(body).then(response => { api.create().countingFormula(body).then(response => {
console.log(response); // console.log(response);
if (response.data) {
if (response.data.status === "success") {
setTimeout(() => {
return response.data.data.result
}, 2000);
}
}
}) })
} else { } else {
let body = { let body = {
...@@ -548,7 +559,9 @@ export default class FixedAssetsMovement extends Component { ...@@ -548,7 +559,9 @@ export default class FixedAssetsMovement extends Component {
// console.log(response) // console.log(response)
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
setTimeout(() => {
return response.data.data.result return response.data.data.result
}, 2000);
} }
} }
}) })
......
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