GithubHelp home page GithubHelp logo

system76 / beansbooks Goto Github PK

View Code? Open in Web Editor NEW
129.0 22.0 36.0 6.25 MB

A revolutionary cloud accounting platform designed for small and medium businesses.

PHP 67.83% CSS 2.65% JavaScript 20.71% Hack 0.01% Mustache 8.81%

beansbooks's Introduction

BeansBooks


Notice

Beansbooks is available "as is" and will no longer be maintained. We would like to thank everyone who has used and contributed to Beansbooks.


Getting Started

This guide will walk you through getting a local instance of BeansBooks running. This is useful for development and testing, but should not be followed strictly for running a live environment. In order to get started, you'll need the following:

  • Apache 2
  • PHP 5 >= 5.3. PHP 7 will not work
  • MySQL 5+
  • Git Client

On Ubuntu, you can run the following to get up to speed:

sudo apt-get update  
sudo apt-get install apache2 php5 libapache2-mod-php5 php5-cli php5-mysql php5-mcrypt php5-gd mysql-server mysql-client git  

Once you've installed all of the prerequesites, create a directory where you want the source to reside, then download the code from git into that directory. The following will create a directory called 'source' within your home directory and install BeansBooks there.

cd ~
mkdir source
cd source
git clone --recursive https://github.com/system76/beansbooks.git
cd beansbooks

Copy the example.htaccess file to .htaccess within your working directory

cp example.htaccess .htaccess

If you are not planning on hosting with SSL, then we need to comment out two lines in the .htaccess file. Open the file for editing:

nano .htaccess

Look for the following two lines:

RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Add a # character before them:

#RewriteCond %{HTTPS} !=on
#RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Additionally, you'll need to update the permissions on two directories before proceeding:

chmod 770 -R application/logs
chmod 770 -R application/cache

And create a configuration file:

touch application/classes/beans/config.php
chmod 660 application/classes/beans/config.php

Finally, your web user ( presumably, www-data ) will require access to the owner of your application directory. Presuming you've setup BeansBooks to run locally, it's easiest to add www-data to your user group.

sudo usermod -a -G `whoami` www-data

If you'd like a more secure solution, you should create a user specifically for BeansBooks and install everything within a sub-folder of the home directory for that user. In that case, you could want to replace `whoami` in the above solution with the name of the user you created.

You should now have everything you need to run BeansBooks locally. Next, we'll configure and setup several dependencies to enable your application to run.

Configuring Packages

Before configuring BeansBooks itself, we need to setup the environment to run it. We're going to quickly setup a local MySQL database, Apache Virtual Host, and create the correct permissions on our code.

MySQL

When setting up the packages in "Getting Started" above, you should have been prompted to create a root password for MySQL. You'll need this for the next set of steps. Run the following to connect to MySQL - you should provide the password that you created earlier when prompted.

mysql -h localhost -u root -p

Next - enter the following lines one by one. Please note - this sets the password for your database user to "beansdb" and should probably be changed. Go ahead and replace "beansdb" with a strong password.

CREATE USER 'beans'@'localhost' IDENTIFIED BY  'beansdb';  
GRANT USAGE ON * . * TO  'beans'@'localhost' IDENTIFIED BY  'beansdb' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;  
CREATE DATABASE IF NOT EXISTS  `beans` CHARACTER SET utf8 COLLATE utf8_general_ci;
GRANT ALL PRIVILEGES ON `beans`.* TO 'beans'@'localhost';
exit  

Great! Now you've setup your database and user. Please make a note of the username ( beans ) and password you set above.

Apache

First things first, enable Mod_Rewrite:

sudo a2enmod rewrite

Now we're going to setup Apache to serve BeansBooks locally. In order to determine where are going to set our document root, we need to run the following in a terminal:

pwd

Whatever the output of that is - make a note of it. It will be the "document root" for your virtual host.

We're going to setup our instance of BeansBooks to be found at http://beansbooks/ - this is convenient as it will neither interfere with an actual domain, and can be configured fairly easily. Go ahead and run the following command:

sudo nano /etc/apache2/sites-available/beansbooks.conf

That will open a text editor for a new virtual host configuration - go ahead and copy and paste the following into the file. Make sure to replace PWDHERE with the result of running "pwd" above - it will probably looking something like /home/yourusername/source/beansbooks and should be inserted without any trailing / .

TIP: To paste into the editor that you've opened, use Control + Shift + "v"

<VirtualHost *:80>
    ServerName beansbooks 
    ServerAlias beansbooks 

    DocumentRoot PWDHERE            
    <Directory PWDHERE>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>
</VirtualHost>

If you're using Apache 2.4 or newer you should use the following instead.

<VirtualHost *:80>
    ServerName beansbooks 
    ServerAlias beansbooks 

    DocumentRoot PWDHERE            
    <Directory PWDHERE>
        Options FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

After pasting in and editing the above code, hit Control + "x" to exit. If it prompts you to save your changes, hit "y". Then run the following to disable the default virtual host, enable the beansbooks.conf virtual host and reload the Apache configuration.

sudo a2dissite 000-default
sudo a2ensite beansbooks.conf
sudo service apache2 reload

Then we need to add an entry to your hosts file to be able to load the local instance of beans.

sudo sh -c "echo '127.0.0.1 beansbooks' >> /etc/hosts"

Installation

At this point you should be able to navigate to http://beansbooks/ to finish the installation process. If you would prefer to run the installation and initial database setup from the command line please do as follows:

Manually Configure BeansBooks

Copy example.config.php to config.php in application/classes/beans/ and fill in the appropriate information.

cd application/classes/beans/
cp example.config.php config.php
chmod 660 config.php
nano config.php

It's important that your config file is not world-readable. The keys that encrypt your data, in addition to your database and email credentials, should be secure.

There are quite a few values that should be changed in the file, however it's mostly self explanatory. For starters, every place that you see "INSERT_STRONG_KEY" should have a unique, long ( at least 128 characters ), string of random characters. You can generate random data from here: https://www.grc.com/passwords.htm

Also note that you should enter the MySQL username and password you setup above under the "database" section.

Lastly, email support is optional - though it enables quite a few useful features when communication with customers and vendors. If you have an SMTP email provider, you should enter the correct information in the "email" section.

Once you've saved the config.php file, it's time to manually run the installation process.

cd ~/source/beansbooks
php index.php --uri=/install/manual --name="Your Name" --password="password" --email="[email protected]" --accounts="full"

SSL Support

If you would like to serve your instance of BeansBooks over SSL, you just need to add SSL support to your web server:

sudo a2enmod ssl

Then go ahead and edit your virtual host to support SSL connections:

sudo nano /etc/apache2/sites-available/beansbooks.conf

<IfModule mod_ssl.c>
    <VirtualHost *:443>
        ServerName beansbooks
        ServerAlias beansbooks
        
        DocumentRoot PWDHERE            
        <Directory PWDHERE>
            Options FollowSymLinks
            AllowOverride All
            Order allow,deny
            allow from all
        </Directory>

        SSLEngine on

        SSLCertificateFile /path/to/ssl/mydomain.com.crt
        SSLCertificateKeyFile /path/to/ssl/mydomain.com.unlocked.key

        <FilesMatch "\.(cgi|shtml|phtml|php)$">
            SSLOptions +StdEnvVars
        </FilesMatch>

        BrowserMatch "MSIE [2-6]" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
        BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
    </VirtualHost>
</IfModule>

Note - if you adjusted your VirtualHost above for Apache 2.4, you should do so here as well.

When you're done making changes, make sure to restart Apache.

Troubleshooting

MCrypt

If PHP / Apache complain that you're missing mcrypt support, or that an algorithm isn't available - you likely need to manually enable the mcrypt module:

sudo php5enmod mcrypt

Make sure to restart Apache afterwards and it should be resolved.

beansbooks's People

Contributors

bencates avatar btkostner avatar chasingmaxwell avatar doomspork avatar elyrith avatar funnylookinhat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

beansbooks's Issues

Scaling Printed Reports

When printing checks, you must make sure that the browser / printer ignores any possible scaling. This is usually done by checking a box that says "Ignore scaling and print..." This preference should work for all printed forms and templates and doesn't currently ( cuts off reports, such as a Vendor Payment Report ).

FIX: Re-work the scaling of all printed templates so that printing with scaling on OR off will render properly in all printers.

Form Return Types

Some form creations have incorrect parameters that don’t match their return types ( or the return types are incorrect as well ). As an example, Beans_Customer_Sale_Create accepts data->lines[]->sale_line_taxes - this should simply be line_taxes. Make sure that all form return items are non-specific in their parent form type in both creation and return ( data objects that are sent and returned ). Deprecate appropriately and add dual-support until next roadmap.

Vendor documentation references customers

Verify and fix any Vendor objects that reference customer information ( whether it be in the description or, more likely, referencing a direct ID such as customer_id ).

Am i allowed to package this along with my POS application?

I've a commercial POS application that I sell to customers. I am looking to integrate that with an open source accounting software. Beansbooks looks to be new and shiny but I am unsure about the licensing terms. Am I allowed to bundle this along with my POS software that I charge money for?

"Commercial distribution of the Software requires a trademark license agreement and you may be required to pay."
Your license seem to suggest that I might need to pay for that? If it is in deed so, it contradicts what Open Source really stands for! Please clarify.

[Request] Add payment howto information to invoice

Hi,

It would be nice if a field could be provided in the settings to add payment details to all invoices. This would avoid customers asking the inevitable question about how to pay.

A simple field would suffice, maybe with some allowances for basic HTML, as different users would have different requirements based on business rules and local laws.

For instance, we'd add some HTML that looks like:

Payments:

BSB : 123456789
Account Number : 0000000000
Bank : Acme Bank
$Local Payments Note

International Payments:
SWIFT : somecode
$International Payments Note

General Payments Note / Late payments information / no cheques accepted etc

Purchase Refund

When creating a Purchase refund, the invoice process doesn’t correctly work if you provide a bill_date and invoice_number through the frontend. Verify that this does indeed work correctly through the backend and then fix in the delivery.

Taxes Selection on Customer Sales

Selecting taxes isn't very efficient when creating/updating customer sales. The tax selection drop-down doesn't dismiss easily enough and is not configured for keyboard-driven input. The following two scenarios need to be implemented ( and any current handling of the fields removed in favor of them working correctly ).

  1. When you click on the taxes box, it opens the options. Clicking on a specific tax selects or de-selects it and dismisses the taxes box.

  2. When you tab INTO the taxes box, it opens the options. The first item in the list has focus, and you can select/de-select using spacebar or enter, and move up and down your focus with the arrow keys. Tab dismisses the box and moves on.

In both cases, dismissing the box should move the focus to the next appropriate form field ( description on the next line ).

Unit Testing

Would be really fantastic if we had a unit testing master come in and help define use cases and begin setting up our testing structure such that subsequent feature requests could be to add unit tests.

If you're into unit testing ( with phpunit or any other good testing engine ) please feel free to start the conversation on this issue for moving forward.

Add before/after transaction searching

Add “after_transaction_id” and “before_transaction_id” to Beans_Account_Transaction_Search to improve journal searching. Including one of these would not necessarily force a sort order, but it would be expected to use "newest" with after and "oldest" with before. That should probably be documented so that users get the desired result.

This should directly affect the ability to fix Issue #28 .

Repetitive _Delete and _Cancel functions

Currently, several object types have both a _Delete and _Cancel - where the _Delete method will completely remove it from the database, and _Cancel will only reverse it in the journal and mark it as cancelled. These should be combined into a single function call, _Remove, and that call should automatically try to delete the object, and if unsuccessful, cancel it instead.

Any other objects that have either one or the other should be updated to use _Remove, and the _Delete and _Cancel methods should be marked as deprecated in the documentation.

Language (i18n) support

Let's begin planning for what's required to enable a broad base of language support in BeansBooks based on i18n standards. We need to document what changes are required to the code, available modules, and best practices for translating and approving new languages.

If there are any i18n PHP experts out there, feel free to jump in and start the conversation here.

Recovery Script

BeansBooks currently records and encrypts all user actions that are taken, including the resulting data that is generated. The goal of this is two-fold: to be able to provide valuable logs to see who performed what actions on your books, and also to provide a means to restore your entire accounting system to a specific point in time ( in the event of a catastrophic bug or some other unique circumstance ).

We need to figure out what issues are involved in building this restoration tool, both in terms of user experience and data integrity. Throw out some ideas and let's start talking about this tool in preparation for building it in either v1.2 or v2.0.

[Feature] Australian invoicing requirements

Hi there, loving BeansBooks, great work.

Australian taxation laws require the wording "Tax Invoice" followed by the Australian Business Number (ABN) on each invoice. I can't see a way of adding this to a template via the admin, so for now I've hardcoded the text in print.mustache

I think this could be accomplished via "default invoice note" field in the Settings area.

If there is a more update-friendly way of doing this in a template, I'd be happy to hear.

Thanks
James

Relicense with an existing, well-known license

By creating a new license you are creating overhead for potential contributors to understand the new license. I haven't found an explanation of how the license is like other licenses as well, which I suggest. An example would be, "it is similar to X, but with Y".

Please refer to http://opensource.org/licenses and use one of those.

Customer Invoice Date Change

Changing the date of a customer invoice should cascade the sale date earlier if new date is before original sale date in order to properly cascade payment changes.

This should also update any relevant customer payments with Customer_Payment_Calibrate

Allow 0.00 Transactions

There are a multitude of use-cases where an account transaction should be able to have a zero net-sum on itself. For example, when recording a payment and you are simply intending to write-off any extraneous balances that are not going to be collected or remitted.

This should change in _validate_account_transaction()

Database Table Deadlocks

In the extremely rare case that two transactions are performed at the same exact time, the account_transactions table can deadlock and possibly corrupt the balances recorded on the table. Given that we're using InnoDB, we should be able to avoid this with some clever uses of SELECT ... FOR UPDATE and updating rows directly on the table rather than locking the table and running a batch of queries.

Currency Symbols

Properly cascade the selected currency symbol through all forms and outputs in both Javascript and printing.

Account Transaction Jump

When clicking the "jump" icon on a transaction to go to the transfer account, it should not only load the new account journal, but load directly to ( and highlight ) the affected transaction.

After install, points to nonexistent /dash

I did everything as mentioned in the readme, also changed the DB access credentials form application/classes/beans/config.php and when I log in I'm directed to a /dash directory (or file with no extension) which does not exist.

What to do?

The BeansBooks iicense is not open source.

Hi. The BeansBooks License (https://github.com/system76/beansbooks/blob/master/BEANSBOOKS.LICENSE.md) is not an OSI-approved open source license, and clause 4.3 appears to be incompatible with the Open Source Definition (see http://opensource.org/definition), even taking into account the "...except solely as necessary to comply with Section 4.2" language.

Suggested fix: just use one of the approved open source / free software licenses (ideally, one of the already widely-used ones) that appears on both http://opensource.org/licenses and http://www.gnu.org/licenses/license-list.html.

In case it helps: both the FSF and the OSI put a great deal of effort into evaluating licenses before certifying them. At the OSI, sometimes even licenses that we expected to sail through the process end up needing modification, or are rejected in the end. It is this care & rigor that enables people everywhere to depend on the term "open source" meaning something reliable. Thus if you want this software to be open source -- which I'd certainly like to see, as it looks very interesting! -- the best route is to use one of the already-approved licenses.

While the BeansBooks License hasn't been through that formal OSI evaluation process, there was some discussion about the license this past summer, and a number of people raised concerns. You can see those concerns starting here in the thread:

http://projects.opensource.org/pipermail/license-discuss/2013-September/001248.html

Best,
-Karl

Slim Responses on Search.

Search results are currently far too slow when evaluating large objects ( such as Vendor_Payment, Customer_Payment, or Account_Transaction ). To address this issue, and provide the appropriate amount of information for an indexed search, we need to introduce a trimmed version of the result object type with only direct attributes and absolutely necessary objects.

As an example, Beans_Customer_Sale_Search should return all sale attributes and the customer ( just customer, not their nested attributes such as all addresses, etc. ). These objects should be re-labeled to #Beans_Customer_Sale_Trim# or something similar.

All of the _Search methods ( or children of them ) should be updated to follow this new pattern and documentation should be added to reference those objects appropriately.

If we implement this quickly enough it won’t get in the way of anyone using the API - better now than much later as it will vastly improve site performance.

[Feature] Add payments received to invoice print page

When printing off an invoice after a payment has been applied to it, the payments nor the updated amount due does not display on the printed page. This could cause confusion for some clients if the printed invoice page is sent to said client.

A fix for this would be to display the payments and total amount currently due on the print page.

Implement Caching

BeansBooks works with and returns a large volume of extremely verbose objects - some of these will be worth caching even after making improvements to the search results as referenced in Issue #31 . We need to evaluate implementing a standard caching interface ( Kohana::Cache is the obvious choice ) and establish a basis for what objects should be cached, when they should be cached, and for how long along with a valid procedure for updating cached objects.

Wrapped up in this discussion is the determination as to whether it is good practice for BeansBooks to depend upon Kohana modules. Technically speaking, the design pattern used for BeansBooks backend code should have no dependencies outside of the classes/ folder wherein it resides. To change this would be a significant undertaking and only worth pursuing if it significantly improved the long-term outlook for the code-base while also maintaining feature-parity.

Can't Edit Sales Tax

If you try to edit a sales tax that is already saved, you get the following error:

Invalid tax fee: FEE NOT YET FULLY UI SUPPORTED.

Dash Load Times / Reports

With a significant amount of information on the dash ( especially within the past-due invoices areas ), the page load times are horribly inefficient. Dash reports should be cached as efficiently as possible ( however it makes sense to reduce page load while not substantially taxing server resources ) while also improving the queries being run on those reports.

All reports should be leveraging direct querying over using the ORM - this is a fantastic case-in-point of that requirement.

Customer Payments before Sale Dates

Customer invoices and sales can currently record a payment before their creation date, resulting in an improper attribution of deferred income. Two issues should be resolved with this:
a) You should not be able to record a payment before the creation date of a sale.

b) Verify and fix any outstanding issues that may cause deferred income to not properly tabulate: check Customer_Payment_Calibrate / Create / Update and Customer_Sale_Update .

Beans_Tax_* Role and Permission

Beans_Tax_* needs it’s own perm-group to allow the API to manipulate taxes while not being a super-admin. Add the “tax_read” and “tax_write” permissions and cascade them throughout all files related to taxes.

Payment Write-offs and Balances

Payments need to be able to record a monetary amount and then immediately write that amount off while maintaining correct transaction values.

For example - the way that write-off values are currently calculated are based on the assumption of a negative ( if customer ) or positive ( vendor ) balance. These values should instead be calculated no matter the sign and appropriately adjust. Furthermore, if you have an invoice with a balance of zero, you should be able to record a payment to that invoice and immediately write-off the balance back to zero. This is useful in quick-receipts of a past-due invoice that was previously written off.

Be sure to check and make sure that the write-off logic cascades correctly on Customer_Payment_Calibrate and Vendor_Payment_Calibrate.

Payment Form Searching

Customer and Vendor Payments - When searching for forms in this process, we should return results with a 0.00 balance. There are definite use cases that fit this and they become extremely complex without this fix.

Javascript Cleanup

The Javascript powering the front-end of BeansBooks needs to be cleaned up and normalized. While the work for this won't take place until the v2.0 development roadmap, we need to begin outlaying the design patterns for that shift now.

If you have any interest in well-structured and clearly-defined UI/UX Javascript, feel free to start a discussion on this post and begin creating the design pattern to be used.

Account Reconciliation Limits

When reconciling an account, you are limited by POST variable limits in how many transactions can be reconciled. We've addressed this issue in the various payment forms by encoding the form fields in JSON and submitting it as a single POST value. Let's go ahead and duplicate that functionality here ( and anywhere else where we might perceive that issue coming up ).

Report Customization

Add the ability for reports to have a customized list of accounts to include/exclude on the following:

  • Balance Sheet
  • Income Statement
  • Budget Detail

If applicable, replace "Show Accounts with Zero Balances" box with an "Accounts" button. On click, button pops up with a list of possible accounts to show on the report. As is the case now, zero balance accounts remain hidden by default. Show zero balance accounts is a tick box at the top of the pop up.

Trial Balance Shows Pending Accounts

These shouldn't be included - patch incoming:

--- a/application/classes/beans/report/trial.php
+++ b/application/classes/beans/report/trial.php
@@ -67,26 +67,35 @@ class Beans_Report_Trial extends Beans_Report {

                foreach( $accounts as $account )
                {
-                       $return_account = new stdClass;
-                       $return_account->id = $account->id;
-                       $return_account->name = $account->name;
-                       
-                       if( isset($account->type->table_sign) )
+                       if( ! isset($account->type->code) ||
+                               strpos($account->type->code,'pending_') === FALSE )
                        {
-                               $return_account->table_sign = $account->type->table_sign;
-                               $return_account->balance = $this->_generate_simple_account_balance($account->id,$account->type->table_sign,$date);
+                               $return_account = new stdClass;
+                               $return_account->id = $account->id;
+                               $return_account->name = $account->name;
+                               
+                               if( isset($account->type->table_sign) )
+                               {
+                                       $return_account->table_sign = $account->type->table_sign;
+                                       $return_account->balance = $this->_generate_simple_account_balance($account->id,$account->type->table_sign,$date);
+                               }
+                               else
+                               {
+                                       $return_account->table_sign = NULL;
+                                       $return_account->balance = NULL;
+                               }
+
+                               if( isset($account->accounts) AND 
+                                       count($account->accounts) )
+                                       $return_account->accounts = $this->_generate_simple_accounts($account->accounts,$date);
+                               
+                               if( (
+                                               isset($return_account->accounts) &&
+                                               count($return_account->accounts) 
+                                       ) ||
+                                       $return_account->table_sign !== NULL )
+                                       $return_array[] = $return_account;
                        }
-                       else
-                       {
-                               $return_account->table_sign = NULL;
-                               $return_account->balance = NULL;
-                       }
-
-                       if( isset($account->accounts) AND 
-                               count($account->accounts) )
-                               $return_account->accounts = $this->_generate_simple_accounts($account->accounts,$date);
-                       
-                       $return_array[] = $return_account;
                }

                return $return_array;

View Vendor doesn't work.

When viewing a vendor you get an error:

Undefined property: stdClass::$transactions in the view render. /classes/controller/vendors.php [ LINE 200 ]

Close Books Includes Pseudo-accounts

Patch incoming:

--- a/application/classes/beans/account/closebooks.php
+++ b/application/classes/beans/account/closebooks.php
@@ -96,9 +96,14 @@ class Beans_Account_Closebooks extends Beans_Account {

                foreach( $accounts as $account )
                {
-                       if( strtolower($account->account_type->type) == "income" OR 
-                               strtolower($account->account_type->type) == "cost of goods sold" OR 
-                               strtolower($account->account_type->type) == "expense" )
+                       if( (
+                                       strtolower($account->account_type->type) == "income" OR 
+                                       strtolower($account->account_type->type) == "cost of goods sold" OR 
+                                       strtolower($account->account_type->type) == "expense" 
+                               ) AND
+                               (
+                                       strpos($account->account_type->code, 'pending_') === FALSE
+                               ) )
                        {
                                $balance = $this->_generate_simple_account_balance($account->id,$balance_report_date);
                                if( $balance != 0.00 )

Form Buttons Enable/Disable

When working with various forms, it appears as though the buttons aren't being updated to reflect that they should be clickable ( and often times they are ). For example, you can refund a purchase but the button is grayed out. Verify that all buttons are correctly triggering on/off and working as intended per the design spec in the code.

Any questions as to what should or shouldn't be accessible for an object at a given point can be addressed here as well.

Refunds > Original Amount

Allow creating refunds with a value greater than the original amount; while it might not make sense to refund a negative invoice, it can happen, and it is best to stay out of the way of the user in this use case.

Changing taxes on invoiced sales doesn't update tax accounts.

After a sale has been converted to an invoice, if you change the taxes on the invoice, the affected tax balances will not properly re-calculate any removed taxes.

Should be fixed with this patch - but verify that new taxes are being properly tabulated.
Customer/Sale/Update.php - line 278 ++

// Reverse current taxes if billed.
if( $this->_sale->date_billed )
{
    foreach( $this->_sale->form_taxes->find_all() as $sale_tax )
        $this->_tax_adjust_balance($sale_tax->tax_id,( -1 * $sale_tax->total) );
}

Form Balances Incorrect

All forms seem to have issues displaying the correct balance when being edited ( after having been already saved ). This includes Customer Sales & Invoices, Vendor Expenses, and Vendor Purchases ). Verify that there is nothing wrong with the returned information from the back-end and update the JavaScript as necessary.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.