Hi,

I've tested voiding an invoice and it seems to disappear completely.  It does not raise a credit note.

Even if it has had a payment allocated to it the payment is de-allocated and is available to be allocated against another invoice.

This voiding scares me a little - especially in relation to bank reconciliation.

So, what are the limits to voiding transactions?  What are the principles behind the voiding of the various transactions?

Thanks,

Kevin B

Hi Elax,

I've just spoken to our accountant - and your patch seems to be closer to what should happen.  If there is an overpayment or an underpayment when paying a foreign exchange invoice then this should go into the foreign exchange gain/loss account.

I'm just looking into it further now.

Hmmmm....

Just checking here.

I thought the foreign exchange gain/loss occured when the exchange rate on the invoice date is different than the exchange rate on the payment date.

http://www.allbusiness.com/glossaries/foreign-currency-transaction-gain-or-loss/4951388-1.html

Therefore - having only one exchange rate per day keeps things clean.

What your patch addresses is the fact that the actual rate used by the bank when making the payment is hardly ever an exact match to the rate for that day.

What I'm proposing is that the difference between the amount being allocated (worked out by the daily rate and the actual amount paid in the local currency) and the amount on the invoice should be treated as an over or under payment.

Thanks for your feedback - it's great to get the detail of this sorted out.

Thanks for the patch.

We've been thinking about this whole issue - here's where we've gotten to.

There may be an issue with your patch approach.  That is that FA holds a single rate for each day/date - what happens if there is more than one foreign exchange transaction on that date.  I know it works out the amount on the fly for each transaction but the amount may not match the rate stored for that day.  No biggie of a problem - but it may confuse the story of what's happening.  Also, it may make the Foreign Exchange gain/loss amounts incorrect.

So - this is our current plan.

We run our accounts in GBP.  We get an invoice in a foreign currency amount (EUR 200.00) - we add an exchange rate (from exchange rate historical records online) for that invoice date (say 0.75) - enter the invoice - expenses get increased by the equivalent amount in our local currency (GPB 150.00).

So far so good.

Several days later we then pay the invoice using online payment.

Now - we look at the bank statement/online banking and see the exact amount deducted in our local currency - say it comes out as a payment of GBP 161.00.

So, this is how we enter it on FA.

We look up the exchange rate for the payment date - say 0.8.
We enter that rate in the exchange rate table for the payment date.
We create a payment to that supplier for GBP 161.00.

OK so far - the payment of GBP 161.00 will match perfectly on the reconciliation screen.

Now we go to allocate the payment to the original EUR 200.00 invoice.

FA uses the payment date rate of 0.8 to figure out that is needs GBP 160.00 to fully pay the invoice.  This leaves GBP 1.00 of the payment as unallocated.

NB - it could be the other way depending on the rates - i.e. it may result in an invoice which is not fully paid.

(It's important to note that the exchange rate we enter for the payment date will hardly ever match the exact rate which was used when the bank made the payment.  Rates fluctuate during the day so an exact match is highly unlikely).

The important point to note is that at this point we have an overpayment or an underpayment.

We are going to treat this like any other overpayment or underpayment.  We may have a customer who pays us slightly too much - or one who pays slightly too little.  If they are a private customer they may not be interested in correcting the payment - and it's not worth our time to chase a small underpayment.  I've put up another post at https://frontaccounting.com/punbb/viewtopic.php?id=3982 to work out how to deal with over/under payments.

Please note - if the invoice date and the payment date are the same day then there is no foreign exchange loss or gain as the exchange rate is the same.  Any difference between the amount FA calculates for the invoice/payment and the actual payment made will be treated as an over/under payment.

The main point is this.  Foreign exchange losses/gains occur due to exchange rate differences between the invoice date and the payment date.  Differences in the actual amounts on the allocation screen should be treated as under/over payments.

Agreed - the "Exchange Rate P&L" account holds the differences due to the exchange rate being different on the payment date from the exchange rate on invoice date.

The payment allocation will not match exactly because because the exchange rate on the payment date will hardly ever be an exact match for the rate the bank used when making the payment (rates fluctuate during the day).  I suggest that this difference should probably be handled as an overpayment or an underpayment.

Cheers,

Kevin B

Say we have an invoice we sent out for £121.00

The customer sends us a cheque for 120.00 as payment - £1.00 under by mistake.

He is a good customer with sloppy accounts and as far as he's concerned the invoice has been paid.  We're not bothered about chasing £1.00 from a good customer.

How do we account for this under payment?  The invoice will always show as having £1.00 left unpaid.  We could pay this from petty cash - but then how do we account for this?

And the same for an overpayment.  Say the customer pays us £125.00 by mistake.  We tell him but he says 'Don't worry - don't bother sending the overpaid £4.00 back'.

This will always show on the payment allocation screen as the £4.00 will never be allocated to anything.

Again, how do we account for this?

Cheers,

Kevin B

Hiya!

Thanks for the fast reply.

I would appreciate the patch - cos it works out from the amounts paid the actual rate which applied when the payment was made.

Thanks again.

Cheers,

Kevin B

Did anyone get to resolve this?

34

(2 replies, posted in Setup)

Ah.  That's insteresting.

After making the copy I don't think I was being prompted to login again.  So maybe some session and cache data was hanging around.

Maybe I would like a way to remove active sessions when making the copy - so this would force the user to log in again.

Cheers,

Kevin B

35

(7 replies, posted in Setup)

Basically, the copy from live to training is a complete copy of the web application - source code and database.

This means we can set the training copy up as a separate vhost i.e. accounts.example.com and accounts2.example.com which makes it easier for the users.

It also means that I'm more confident about the backups working - since the training copy is built up from the backup files it means they work.  This means it is easier for us to get extra copies set up on our secondary server.

BTW - the change to the background works really well.  It makes it very clear for the users which copy they are on - and in fact we already refer to 'Try it out on the red copy first' when we come up against something we're not sure how to enter.

Hi,

We have two bank accounts - a general current account and a current account which is linked to our payment cards.

Our admin has marked an invoice as having been paid from the general current account - when it was actually paid by the card account.

What is the best way to correct this - should we void the transaction?  Or should we create a credit note - mark the payment from the general account and then add a new invoice?

Regards,

Kevin B

Hi,

When you click on 'Customer Payment Entry' you go into the screen and it shows the last customer you looked at.  However, it does not show any invoices which are outstanding.

Workaround:

Select another customer and then select the first customer again.

Recreate:

Go into 'Customer Payment Entry' - select a customer who has outstanding invoices and you will see the invoices.

Select 'Sales' then 'Customer Payment Entry'.  The last selected customer will be selected but the invoices will not be listed.

Cheers,

Kevin B

Hi,

Somehow our admin has added a payment which has no GL transactions.

If I find the transaction in the 'Customer Transactions' report it shows a debit of 0.00.

If I click on the book icon (GL) I get:

'No general ledger transactions have been created for Customer Payment number 5'

If I click on the transaction number I get:

'DATABASE ERROR : no debtor trans found for given params
sql that failed was : SELECT trans.*,ov_amount+ov_gst+ov_freight+ov_freight_tax+ov_discount AS Total,cust.name AS DebtorName, cust.address, cust.curr_code, cust.tax_id ,bank_act,0_bank_accounts.bank_name, 0_bank_accounts.bank_account_name, 0_bank_accounts.account_type AS BankTransType FROM 0_debtor_trans trans LEFT JOIN 0_comments com ON trans.type=com.type AND trans.trans_no=com.id LEFT JOIN 0_shippers ON 0_shippers.shipper_id=trans.ship_via, 0_debtors_master cust, 0_bank_trans, 0_bank_accounts WHERE trans.trans_no='5' AND trans.type='12' AND trans.debtor_no=cust.debtor_no AND 0_bank_trans.trans_no ='5' AND 0_bank_trans.type=12 AND 0_bank_trans.amount != 0 AND 0_bank_accounts.id=0_bank_trans.bank_act '

It looks to me like a payment record has been added but no GL transactions created.

This doesn't look like it's causing any issues - but I would like it removed.

Is there a safe way to remove it - I've looked under 'Void Transaction' but it does not get listed.

Thanks,

Kevin B

39

(7 replies, posted in Setup)

I'd like to copy the live copy to the training copy every night via cron.

What I've done is to add

sed -i 's/285b86/ff0000/g' /home/frontacc2/public_html/themes/default/default.css

to the script which makes the copy.

I've added the script to the wiki - it's at the end of:

https://frontaccounting.com/fawiki/index.php?n=Main.Installation

40

(7 replies, posted in Setup)

Thanks for the reply.

Is there anyway to set the theme from the command line?

Thanks,

Kevin B

41

(7 replies, posted in Setup)

Hi,

I've set up a training copy of the live accounts and would like it to have a very different background colour.  This is so that people using the training version will not forget that they are on the training copy.

If there is any other way to make the copy look distinct from the live copy I would appreciate any pointers.

Thanks,

Kevin B

42

(2 replies, posted in Setup)

Hi,

I'm making a copy of our live site to a training copy.  Is there any caches which can be cleared out?

And in general should we need to clear out any caches regularly to keep the site running well?

Regards,

Kevin Bailey

To reply to my own post...

It needed a restart of Apache to enable the copy site to work without the error.

For reference here's my script which makes a copy of a site - I'll try to find somewhere on the wiki where it might be useful.

NB - The server runs Apache ITK so all files are owned by a single user.

#!/bin/bash

# copy_accounts_to_accounts2

# ----------------------------------------------------------------------------------
# This will take a copy of the live Open Atrium site and copy it to a training copy.
# ----------------------------------------------------------------------------------

# -------------------------------------------------------------------------------------------------
# Logging setup
# -------------------------------------------------------------------------------------------------

# These lines have been copied from http://stackoverflow.com/questions/3173131/redirect-copy-of-stdout-to-log-file-from-within-bash-script-itself
# and will send the script output to a log file.
##mkdir -p /var/backups/sbin
##mkdir -p ~/logs/pullpush
##DATE_TIME=`date +%Y%m%d-%H%M%S`
##logfile=~/logs/pullpush/pulldevfrombeta_${DATE_TIME}.log
##mkfifo ${logfile}.pipe
##tee < ${logfile}.pipe $logfile &
##exec &> ${logfile}.pipe
##rm ${logfile}.pipe

DATE_TIME=`date +%Y%m%d-%H%M%S`

# -------------------------------------------------------------------------------------------------
echo
echo `date`
echo "Backup primary site..."
# -------------------------------------------------------------------------------------------------

# Here we will create backups which are datetime stamped to be able to go back to a previous 
# version if necessary.
mkdir -p /home/frontacc/backups
mysqldump frontacc > /home/frontacc/backups/${DATE_TIME}_frontacc.sql
tar --create --file=/home/frontacc/backups/${DATE_TIME}_frontacc.tar /home/frontacc/public_html

# Here we will make a backup to a standard location so that it is backed up by backup scripts.
mysqldump frontacc > /var/backups/frontacc.sql
tar --create --file=/var/backups/frontacc.tar /home/frontacc/public_html

# -------------------------------------------------------------------------------------------------
echo
echo `date`
echo "Load the backup into the site..."
# -------------------------------------------------------------------------------------------------
mysqladmin --force drop frontacc2
mysqladmin create frontacc2

mysql frontacc2 < /var/backups/frontacc.sql

rm -r /home/frontacc2/public_html/*
tar -x --file=/var/backups/frontacc.tar --directory=/home/frontacc2/public_html --strip-components=3 

# We need to change ownership to openatriumcopy for the files just unzipped and need to change permissions
# on the files/ directory.
chown -R frontacc2:frontacc2 /home/frontacc2/public_html

# -------------------------------------------------------------------------------------------------
echo
echo `date`
echo "Set up the settings.php file..."
# -------------------------------------------------------------------------------------------------
sed -i 's/Freeway Projects Limited/Freeway Projects Limited2/g' /home/frontacc2/public_html/config_db.php
sed -i 's/frontacc/frontacc2/g' /home/frontacc2/public_html/config_db.php
sed -i 's/firstsitepasswd/secondsitepassword/g' /home/frontacc2/public_html/config_db.php




# -------------------------------------------------------------------------------------------------
echo
echo `date`
echo "Setting up the copy site with a different appearance from the live site..."
# -------------------------------------------------------------------------------------------------
## Todo


# -------------------------------------------------------------------------------------------------
echo
echo `date`
echo "A restart of Apache is needed for the copy site to work..."
# -------------------------------------------------------------------------------------------------
apache2ctl restart


# -------------------------------------------------------------------------------------------------
echo
echo `date`
echo "Finished"
# -------------------------------------------------------------------------------------------------

Hi,

I'd like to make a complete copy of a FA install - I've copied the database and the files - changed the database settings in config_db.php but I'm getting the error:

PHP Fatal error:  Class 'application' not found in /home/frontacc2/public_html/applications/customers.php on line 13

Any pointers gratefully received.

45

(2 replies, posted in Setup)

Hi,

I'd like to make a complete copy of a FA install - I've copied the database and the files - changed the database settings in config_db.php but I'm getting the error:

PHP Fatal error:  Class 'application' not found in /home/frontacc2/public_html/applications/customers.php on line 13

Any pointers gratefully received.