Commit 22cad9d6 authored by Riri Novita's avatar Riri Novita

Merge branch 'riri' into 'master'

apdet

See merge request !1189
parents 6d2124d2 c142d83a
......@@ -192,7 +192,7 @@ export default class SubHolding extends Component {
getLastPeriod() {
api.create().getLastPeriod(this.state.company.company_id).then(response => {
// console.log(response);
console.log(response);
if (response.data.status === "success") {
this.setState({ lastPeriod: response.data.data.last_periode, latestPeriode: response.data.data.latest_periode }, () => {
this.getPeriode()
......@@ -229,7 +229,8 @@ export default class SubHolding extends Component {
options: periodeData,
getOptionLabel: (option) => option.periode,
};
let periode = (this.state.lastPeriod == "" ? String(Number(currentYear) + 1) : this.state.lastPeriod)
console.log(this.state.lastPeriod)
let periode = (this.state.lastPeriod == "" ? String(Number(currentYear)) : this.state.latestPeriode)
let dateNow = new Date()
dateNow.setMonth(dateNow.getMonth() - 1);
let yearNow = dateNow.getFullYear()
......
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