Skip to content

Commit

Permalink
Merge pull request #143 from fleetimee/fix_print_neraca_v2
Browse files Browse the repository at this point in the history
feat: add fvm
  • Loading branch information
fleetimee authored Jan 26, 2023
2 parents e158809 + b9bd52f commit 2393f23
Show file tree
Hide file tree
Showing 8 changed files with 180 additions and 82 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
- name: Setup Flutter
uses: subosito/flutter-action@v1
with:
flutter-version: "3.3.10"
channel: "stable"

# Decode file KEYSTORE_JKS_PROD yang berbentuk base64 dan mengubahnya menjadi keystore.jks
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,6 @@ app.*.map.json

# Node modules
node_modules/

# FVM related
.fvm/
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"dart.flutterSdkPath": ".fvm/flutter_sdk",
// Remove .fvm files from search
"search.exclude": {
"**/.fvm": true
},
// Remove from file watching
"files.watcherExclude": {
"**/.fvm": true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ Future<Uint8List> makeAnalisaKeuanganPdf(DebiturInsight debtor) async {
decimalSeparator: '',
thousandSeparator: '.',
precision: 0,
initialValue: double.parse(
debtor.analisaKeuangan!.totalAset.toString()),
initialValue: (double.parse(
debtor.inputRugiLaba!.sumAktiva!) -
double.parse(debtor.inputRugiLaba!.tanahDanBangunan!)),
).text),
Spacer(
flex: 8,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ Future<Uint8List> makeNeracaPdf(DebiturInsight debtor) async {
leftSymbol: 'Rp. ',
precision: 0,
initialValue: double.parse(
debtor.inputNeraca!.hutangBank.toString()),
debtor.inputNeraca!.pinjamanLain.toString()),
).text),
],
),
Expand All @@ -444,6 +444,67 @@ Future<Uint8List> makeNeracaPdf(DebiturInsight debtor) async {
TableRow(
children: [
textUmur('6.'),
textUmurBoldLeft('Hutang Lainnya'),
],
),
TableRow(
children: [
textUmur(''),
textUmur(
'Perkiraan ini menunjukkan jumlah hutang lainnya, sebagai berikut :'),
],
),
],
),
SizedBox(height: 10),
Table(
border: // border all
TableBorder.all(color: PdfColors.black, width: 0.5),
columnWidths: {
0: const FlexColumnWidth(0.75),
1: const FlexColumnWidth(0.25),
},
tableWidth: TableWidth.min,
children: [
TableRow(
children: [
Center(child: textUmur('Keterangan')),
textUmurR(DateFormat('dd/MM/yyyy').format(
DateTime.parse(
debtor.inputNeraca!.tanggalInput.toString()))),
],
),
TableRow(
children: [
textUmur('Jumlah'),
textUmur(MoneyMaskedTextController(
decimalSeparator: '',
thousandSeparator: '.',
leftSymbol: 'Rp. ',
precision: 0,
initialValue: double.parse(
debtor.inputNeraca!.hutangBank.toString()),
).text),
],
),
],
),
],
),
SizedBox(height: 20),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Table(
columnWidths: {
0: const FlexColumnWidth(0.04),
1: const FlexColumnWidth(0.96),
},
tableWidth: TableWidth.min,
children: [
TableRow(
children: [
textUmur('7.'),
textUmurBoldLeft('Aktiva Tetap'),
],
),
Expand Down
2 changes: 1 addition & 1 deletion macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import firebase_crashlytics
import firebase_messaging
import flutter_local_notifications
import geolocator_apple
import path_provider_macos
import path_provider_foundation
import printing
import share_plus
import shared_preferences_foundation
Expand Down
Loading

1 comment on commit 2393f23

@vercel
Copy link

@vercel vercel bot commented on 2393f23 Jan 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.