Commit 373a4923 authored by Riri Novita's avatar Riri Novita

Update Currency MB

parent 724b4974
...@@ -295,8 +295,9 @@ export default class BalanceSheet extends Component { ...@@ -295,8 +295,9 @@ export default class BalanceSheet extends Component {
let res = await fetch( let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}` `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
) )
console.log(res);
res = await res.blob() res = await res.blob()
// console.log(res) console.log(res)
if (res.size > 0) { if (res.size > 0) {
let url = window.URL.createObjectURL(res); let url = window.URL.createObjectURL(res);
let a = document.createElement('a'); let a = document.createElement('a');
...@@ -306,6 +307,23 @@ export default class BalanceSheet extends Component { ...@@ -306,6 +307,23 @@ export default class BalanceSheet extends Component {
} }
} }
// downloadTemplate = async () => {
// let res = await fetch(
// `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
// )
// console.log(res)
// res = await res.blob()
// console.log(res)
// if (res.size > 0) {
// let url = window.URL.createObjectURL(res);
// console.log(url);
// let a = document.createElement('a');
// a.href = url;
// a.download = 'Template Master Budget Balance Sheet.xlsx';
// a.click();
// }
// }
fileHandler = (event) => { fileHandler = (event) => {
let fileObj = event let fileObj = event
ExcelRenderer(fileObj, (err, resp) => { ExcelRenderer(fileObj, (err, resp) => {
...@@ -3803,7 +3821,7 @@ export default class BalanceSheet extends Component { ...@@ -3803,7 +3821,7 @@ export default class BalanceSheet extends Component {
/> />
</div> </div>
</div> </div>
<div style={{ padding: '10px 30px' }}> <div style={{ padding: '15px 30px 55px' }}>
<UploadFile <UploadFile
type={this.state.uploadStatus} type={this.state.uploadStatus}
percentage={this.state.percentage} percentage={this.state.percentage}
......
...@@ -8,7 +8,7 @@ import Images from '../../assets/Images'; ...@@ -8,7 +8,7 @@ import Images from '../../assets/Images';
import * as R from 'ramda' import * as R from 'ramda'
import { PropagateLoader } from 'react-spinners'; import { PropagateLoader } from 'react-spinners';
import Constant from '../../library/Constant'; import Constant from '../../library/Constant';
import { Alert } from '@material-ui/lab'; import { Alert, Autocomplete } from '@material-ui/lab';
var ct = require("../../library/CustomTable"); var ct = require("../../library/CustomTable");
const getMuiTheme = () => createMuiTheme(ct.customTable3()); const getMuiTheme = () => createMuiTheme(ct.customTable3());
...@@ -42,7 +42,9 @@ export default class CashFlow extends Component { ...@@ -42,7 +42,9 @@ export default class CashFlow extends Component {
loading: false, loading: false,
minValue: "0", minValue: "0",
maxValue: "0", maxValue: "0",
handleDoubleClick: 0 handleDoubleClick: 0,
defaultCurrencyUpload: this.props.defaultCurrency,
visibleAlertSave: false
} }
} }
...@@ -380,6 +382,7 @@ export default class CashFlow extends Component { ...@@ -380,6 +382,7 @@ export default class CashFlow 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": 6, "report_id": 6,
"currency_id": this.props.defaultCurrency.id,
"status": "submitted", "status": "submitted",
"cash_flow": dbcf "cash_flow": dbcf
} }
......
...@@ -252,6 +252,7 @@ export default class ProfitLoss extends Component { ...@@ -252,6 +252,7 @@ export default class ProfitLoss extends Component {
backToMasterBudget(type) { backToMasterBudget(type) {
// tambahin currency // tambahin currency
console.log("tes");
let data = [] let data = []
this.state.dataTable.map(i => { this.state.dataTable.map(i => {
data.push({ data.push({
...@@ -3228,7 +3229,7 @@ export default class ProfitLoss extends Component { ...@@ -3228,7 +3229,7 @@ export default class ProfitLoss extends Component {
/> />
</div> </div>
</div> </div>
<div style={{ padding: '10px 30px' }}> <div style={{ padding: '15px 30px 55px' }}>
<UploadFile <UploadFile
type={this.state.uploadStatus} type={this.state.uploadStatus}
percentage={this.state.percentage} percentage={this.state.percentage}
......
...@@ -765,8 +765,9 @@ export default class TaxPlanning extends Component { ...@@ -765,8 +765,9 @@ export default class TaxPlanning extends Component {
let res = await fetch( let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}` `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
) )
console.log(res)
res = await res.blob() res = await res.blob()
// console.log(res) console.log(res)
if (res.size > 0) { if (res.size > 0) {
let url = window.URL.createObjectURL(res); let url = window.URL.createObjectURL(res);
let a = document.createElement('a'); let a = document.createElement('a');
...@@ -9085,8 +9086,8 @@ export default class TaxPlanning extends Component { ...@@ -9085,8 +9086,8 @@ export default class TaxPlanning extends Component {
</div> </div>
</button> </button>
</div> </div>
{this.props.isApprover === true || this.state.dataTable.length == 0 ? null : {/* {this.props.isApprover === true || this.state.dataTable.length == 0 ? null :
(!this.props.truelyApprover) && (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') ? (!this.props.truelyApprover) && (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') ? */}
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}> <div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}>
<button <button
className="button" className="button"
...@@ -9159,8 +9160,9 @@ export default class TaxPlanning extends Component { ...@@ -9159,8 +9160,9 @@ export default class TaxPlanning extends Component {
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography> <Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
</div> </div>
</button> </button>
</div> : null </div>
} {/* : null
} */}
</div> </div>
</Paper> </Paper>
: :
...@@ -9321,7 +9323,7 @@ export default class TaxPlanning extends Component { ...@@ -9321,7 +9323,7 @@ export default class TaxPlanning extends Component {
/> />
</div> </div>
</div> </div>
<div style={{ padding: '10px 30px' }}> <div style={{ padding: '15px 30px 55px' }}>
<UploadFile <UploadFile
type={this.state.uploadStatus} type={this.state.uploadStatus}
percentage={this.state.percentage} percentage={this.state.percentage}
...@@ -9342,7 +9344,7 @@ export default class TaxPlanning extends Component { ...@@ -9342,7 +9344,7 @@ export default class TaxPlanning extends Component {
</div> </div>
)} )}
{this.state.visibleAlertSave && ( {this.state.visibleAlertSave && (
<div className="test app-popup-show"> <div className="test app-popup-show">
<div className="popup-content border-radius" style={{ background: '#FFF27D', borderRadius: 10, width: 715, height: 238 }}> <div className="popup-content border-radius" style={{ background: '#FFF27D', borderRadius: 10, width: 715, height: 238 }}>
<div style={{ margin: 30 }}> <div style={{ margin: 30 }}>
......
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