Skip to content

Commit

Permalink
Fixes item cache, rewords profit viewer error, relocates settings, re…
Browse files Browse the repository at this point in the history
…moves verified tags

* Fix item cache refresh after saving settings.
* Fix the unhelpful empty message in transaction profit viewer.
* Removed the dead verify account button and *Unverifed text in side bar
* Moved the app settings at top
  • Loading branch information
hemanta212 committed May 24, 2020
1 parent 6f1f52f commit b1f0004
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 60 deletions.
16 changes: 6 additions & 10 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
Version 0.9.4
Version 0.9.41

# Book Keeping App

Features:
* Adds new setting for disabling strict totalStock check.
- The new check box in setting allows users to loosen the check on the stocks
- Let them just use the app for recording the transactions only.
- CP wont be correct and will depend upon latest transaction regardless of the old stock.
- It will give less accurate profit picture but will enable use of app without much investment of counting existing items

* When strict checking of totalStock is disabled. It is required to give the costprice & markedPrice of item while registering.
- A new cp & mp field will be added in itemEntryForm but only visible when aforementioned setting is applied.
Fixes:
* Fix item cache refresh after saving settings.
* Fix the unhelpful empty message in transaction profit viewer.
* Removed the dead verify account button and *Unverifed text in side bar
* Moved the app settings at top
28 changes: 18 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
# bk_app
# Inventory management and bookkeeping app
A practical approach to bookeeping in retail or small business.
This app is focused on making the sales entry, stock entry as fast as practically possible.

A new Flutter project.
![Build](https://github.com/hemanta212/hello_flutter/workflows/Bookkeeping_app/badge.svg)

## Getting Started
## App overview

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:
## Project Installation:
### 1. Building yourself

- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
* First Install flutter : [Flutter Installation](https://flutter.dev/docs/get-started/install)

For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
```
$ git clone https://github.com/hemanta212/bookkeeping_app.git
$ cd bookkeeping_app
$ flutter upgrade
$ flutter pub get
$ flutter run
```

### 2. Install and try out the apk!
Head over to the release page to try out the apps. [APK Releases](https://github.com/hemanta212/bookkeeping_app/releases/latest)
59 changes: 22 additions & 37 deletions lib/app/settings.dart
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

import 'package:bk_app/models/user.dart';
import 'package:bk_app/services/crud.dart';
import 'package:bk_app/utils/loading.dart';
import 'package:bk_app/utils/scaffold.dart';
import 'package:bk_app/utils/window.dart';
import 'package:bk_app/utils/cache.dart';
import 'package:bk_app/app/wrapper.dart';
import 'package:bk_app/services/auth.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

class Setting extends StatefulWidget {
@override
Expand Down Expand Up @@ -81,6 +83,23 @@ class SettingState extends State<Setting> {
Form(
key: _formKey,
child: Column(children: <Widget>[

Container(
padding: EdgeInsets.all(10.0),
child: Text('App settings',
style: localTheme.textTheme.title),
),

Row(children: <Widget>[
Text("Enforce stock checking",
style: localTheme.textTheme.subhead),
Checkbox(
value: this.checkStock,
onChanged: (bool val) {
setState(() => this.checkStock = val);
}),
]),

Container(
padding: EdgeInsets.all(10.0),
child: Text('Account settings',
Expand Down Expand Up @@ -112,26 +131,6 @@ class SettingState extends State<Setting> {
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(5.0)),
)),
Visibility(
visible: _userData.verified ? false : true,
child: Row(children: <Widget>[
RaisedButton(
color: Colors.red,
child: Text('Email Not verified',
style: TextStyle(color: Colors.white)),
onPressed: () {},
),
SizedBox(width: 20.0),
RaisedButton(
color: Colors.blue[400],
child: Text(
'Send verification',
style: TextStyle(color: Colors.white),
),
onPressed: () async {
print("sending verification");
})
])),

SizedBox(height: 20.0),
Row(children: <Widget>[
Expand All @@ -156,21 +155,6 @@ class SettingState extends State<Setting> {
this.showRolesMapping(_userData),
SizedBox(height: 20.0),

Container(
padding: EdgeInsets.all(10.0),
child: Text('App settings',
style: localTheme.textTheme.title),
),
Row(children: <Widget>[
Text("Enforce stock checking",
style: localTheme.textTheme.subhead),
Checkbox(
value: this.checkStock,
onChanged: (bool val) {
setState(() => this.checkStock = val);
}),
]),

// save
Padding(
padding: EdgeInsets.only(
Expand Down Expand Up @@ -208,6 +192,7 @@ class SettingState extends State<Setting> {
}
print("saving this.userData ${this.userData.roles}");
crudHelper.updateUserData(this.userData);
await StartupCache(userData: userData).itemMap;
Navigator.pop(context);
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/app/transactions/transactionList.dart
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ class TransactionListState extends State<TransactionList> {

if (salesTransactions.isEmpty) {
WindowUtils.showAlertDialog(
context, "Failed!", "Sales history is empty!");
context, "Failed!", "Sales history for today is empty");
return;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/utils/scaffold.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class CustomScaffold {
child: ListView(padding: EdgeInsets.zero, children: <Widget>[
UserAccountsDrawerHeader(
accountName: Text(userData.email),
accountEmail: Text(userData.verified ? "" : "*Unverified"),
accountEmail: Text(''),
currentAccountPicture: CircleAvatar(
backgroundColor: Theme.of(context).platform == TargetPlatform.iOS
? Colors.blue
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: A new Flutter project.
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 0.9.4+1
version: 0.9.41+1

environment:
sdk: ">=2.1.0 <3.0.0"
Expand Down

0 comments on commit b1f0004

Please sign in to comment.