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