Sure, you can handle this by importing a CSV file. I would think the CSV import transactions module should be able to do this with little or no changes.

The main challenge is tracking the transactions. When using Bitcoin as a payment method with services like LNbits or BTCPayServer, they can send a webhook to your server with the fiat value and the number of inventory units you received. This makes it easy to track the cost basis. It sits in your books as the value you received it for, and then when you sell, you capture the gain or loss.

A typical method is FIFO (First In, First Out), where the gain is applied to the oldest inventory first. You would need to manually enter the sale transaction, and the system (FA, for example) should calculate the gain for you. I know it does this when Bitcoin is treated as a foreign currency.

If you're just monitoring a wallet address, you need something like Electrum Server. For example, I have one set up on a small home server running Debian with Umbrel (Umbrel). You can configure it to monitor wallet(s), record transactions in and out, and calculate gains or losses based on the spot price at the time of the transaction.

There are also many online tax tools for crypto that allow you to import CSV files, and they will handle the calculations for you and prepare the necessary tax forms.

I would be more than willing to help out on this. Most of these things already exist it is a question of FA integration. as a miner your issue is triggering the payout from pool or subsidy if solo miner (unlikely lol) to monitor wallets without a payment platform you could use electrum to monitor wallets on blockchain (I have not done this before everything I have done is payment integrations).

for a woo payment integration use
btcpayserver supports woo already
https://docs.btcpayserver.org/WooCommerce/

Note: I will only work on projects that are related to Bitcoin not "crypto". If it works on bitcoin as well, that is ok. Certain stable coins (fiat security tokens) as well.

In the united states it should be treated as inventory Cost basis

a basic sale
credit -> sales, service, or accounts receivable
debit -> inventory

then Adjust inventory units

a basic purchase
credit -> appropriate expense account
debit -> inventory

then Adjust inventory units

every company could be a bit different. depends if bitcoin is an important part of the business like COGS etc

This already can be done with my strikeout module. It has many payment options.
Stripe,
Paypal,
Lnbits (bitcoin Lightning),
Strike (bitcoin reg + Lightning as local currency no merchant fee),
BTC Pay server (bitcoin and lightning default but will support crypto sh*t coins with add ons)
set how you want to account it as foreign currency or as inventory in the payment options. in front accounting
to add it to my website I use an iframe but it will make QR codes on frontaccounting invoices as well.

to install add and activate strikeout module to your fa installation, activate permission for your user roles you want to access information, go to new payment methods settings and set up. When possible make read / invoice api keys only. you dont need payment permission

https://github.com/trafficpest/FA24extensions/tree/strikeout

OK just putting this out there
XRP, Ripple, & Brad Garlinghouse are a scam. They hold a premade share of the tokens (like securities) and sell to fund the scam that is, possibly even funding you.

Bitcoin is the only relevant true open digital asset with no company just code.

Also the FrontAccounting payment module already exists only lacking in polish. StrikeOut extension supports
Traditional Fiat payments ( through PayPal or Stripe)
Bitcoin exchange ie. (BTC payment but Fiat received) through Strike
Bitcoin (std and lightning) Through lnbits and btc payserver

Now if anyone would want to add a scam coin they are free to download plugins for btcpayserver to support scam coins. The only useful ones I can think of is  Stable coins (digital securities issued, fiat backed)  Like USDC or UST. But this should only be used where banking does not exist or is difficult. It is just trading a digital IOU for fiat in a bank that can be frozen or blocked at anytime or possibly the issuer might not meet reserves for redemtion just like a bank.

FrontAccounting Invoices in the clients currency of choice and if they chose to pay another way strikeout will present them with a qr invoice valued at that fiat amount in the digital asset.

6

(26 replies, posted in Modules/Add-on's)

Plaid is a great API to connect to banking institutions and isn't that complicated. I will probably start on it after I finish working on recurring deliveries + auto route optimization.
You are in US so for sure plaid will work for you. That is the drag about global accounting software without adoption of a global standard banking network. (Bitcoin, Cough cough)

Check out plaid here
https://plaid.com

7

(38 replies, posted in Reporting)

I think mail should be the way to go normally but sometimes servers don't have their mail server setup, have deliverability issues, or people just want to send email from a Google account or something will use phpmailer.

8

(26 replies, posted in Modules/Add-on's)

We should make a plaid banking plugin. I was thinking and looking into it but didn't feel like doing the work lol!

you could use my strikeout plugin
It will automatically make payment links in the invoice email, PDF, and make a scanable QR on bottom right of the invoice.
This brings the client to a payment page with their balance and when they pay it will be entered in your front accounting automatic.

It supports
Stripe (credit cards, Cash App, EFT, and other payment methods)
PayPal (credit cards, Venmo, and PayPal)
Strike (Bitcoin as USD no strange accounting 0 merchant fee and fraction of percent to client)
lnBits (bitcoin the asset 0 fee self custody)

You can mix and match payments methods

https://strikeoutpay.com/new-payment-integration-module-for-frontaccounting-strikeout/

you can find it on my git
https://github.com/trafficpest/FA24extensions/tree/strikeout/Extensions/strikeout

this post has the core changes to add the link
https://frontaccounting.com/punbb/viewtopic.php?pid=43088#p43088

10

(1 replies, posted in Setup)

I would copy the database then clear the tables you want cust_trans table bank_trans table etc
or create a new one then import the tables (probably more work)
PHPmysql is good and easy way to edit mysql tables

11

(20 replies, posted in Accounts Receivable)

Maybe it doesn't support date in the transaction reference?
I already had my ref setup without a date. So I didn't get that, I only use numbers.
If you want to do that go here in the app.
Setup->Transaction References

then change sales order to '{00001}'

I would like to look into the date thing but don't have the time right now

12

(20 replies, posted in Accounts Receivable)

sorry to take so long on this just saw this

this one is a little more involved so do this.
if you need I can make a branch of the repo to see the changes, so let me know.

in 'sales/inquiry/sales_orders_view.php' do much like you did before. create a copy function and paste it near the edit function about line 115 in the page

function copy_link($row) 
{
    global $page_nested;

  return pager_link(_("Copy Order") ,
      "/sales/sales_order_entry.php?CopyOrder=". $row['order_no'], ICON_DOC); 
}

then in that same file call it in the salesorder if statement around line 330 at the end of the file. (you could add it to other vues on the page if desired. the changed elseif should look like this. NOTE: it has the closing bracket from the last elseif above.

} elseif ($trans_type == ST_SALESORDER) {
     array_append($cols,array(
            _("Tmpl") => array('insert'=>true, 'fun'=>'tmpl_checkbox'),
                    array('insert'=>true, 'fun'=>'edit_link'),
                    array('insert'=>true, 'fun'=>'copy_link'),
                    array('insert'=>true, 'fun'=>'dispatch_link'),
                    array('insert'=>true, 'fun'=>'prt_link')));
};

Now the problem is the cart doesn't support copying orders like it did on deliveries/invoices. so we will add it.
in file 'sales/sales_order_entry.php' in the top array about line 36 add a CopyOrder type. the finished array should look like this.

    array(    'NewOrder' => 'SA_SALESORDER',
            'CopyOrder' => 'SA_SALESORDER',
            'ModifyOrderNumber' => 'SA_SALESORDER',
            'AddedID' => 'SA_SALESORDER',
            'UpdatedID' => 'SA_SALESORDER',
            'NewQuotation' => 'SA_SALESQUOTE',
            'ModifyQuotationNumber' => 'SA_SALESQUOTE',
            'NewQuoteToSalesOrder' => 'SA_SALESQUOTE',
            'AddedQU' => 'SA_SALESQUOTE',
            'UpdatedQU' => 'SA_SALESQUOTE',
            'NewDelivery' => 'SA_SALESDELIVERY',
            'AddedDN' => 'SA_SALESDELIVERY', 
            'NewInvoice' => 'SA_SALESINVOICE',
            'AddedDI' => 'SA_SALESINVOICE'
            )

in the same file the function create_cart() needs to be modified to allow this new 'CopyOrder' type to pass as a template. change the function to look like this

function create_cart($type, $trans_no)
{ 
    global $Refs, $SysPrefs;

    if (!$SysPrefs->db_ok) // create_cart is called before page() where the check is done
        return;

    processing_start();

    if (isset($_GET['NewQuoteToSalesOrder']))
    {
        $trans_no = $_GET['NewQuoteToSalesOrder'];
        $doc = new Cart(ST_SALESQUOTE, $trans_no, true);
        $doc->Comments = _("Sales Quotation") . " # " . $trans_no;
        $_SESSION['Items'] = $doc;
    }    
  elseif(($type != ST_SALESORDER || isset($_GET['CopyOrder'])) && $type != ST_SALESQUOTE && $trans_no != 0) { // this is template

        $doc = new Cart(ST_SALESORDER, array($trans_no));
        $doc->trans_type = $type;
        $doc->trans_no = 0;
        $doc->document_date = new_doc_date();
        if ($type == ST_SALESINVOICE) {
            $doc->due_date = get_invoice_duedate($doc->payment, $doc->document_date);
            $doc->pos = get_sales_point(user_pos());
        } else
            $doc->due_date = $doc->document_date;
        $doc->reference = $Refs->get_next($doc->trans_type, null, array('date' => Today()));
        //$doc->Comments='';
        foreach($doc->line_items as $line_no => $line) {
            $doc->line_items[$line_no]->qty_done = 0;
        }
        $_SESSION['Items'] = $doc;
    } else
        $_SESSION['Items'] = new Cart($type, array($trans_no));
    copy_from_cart();
}

@apmuthu and @joe
here is an idea though I dont think it should be in core. People can already template an order and copy invoices and deliveries. if you copy or direct deliver you will get a delivery ref number and that could be used for an api unique ID. Or if you have to use an order could you not use the order# already?

13

(20 replies, posted in Accounts Receivable)

That should only be on direct invoice the direct delivery gets an auto for ref but the invoice gets the next number.
That is normal behavior when you skip the delivery step. if you copy the delivery it will get a ref number than invoice against that invoice.

14

(2 replies, posted in Wish List)

I saw this review as well. I would like to propose a change to the customer search to be able to search phone numbers and emails. I often get texts from clients and I am unclear as to whom i'm speaking with, or when scheduling delivery note, I forget who it was. I added all crm fields in the search but didnt include them in the table for fear of clutter. The crm table view does have all those things and looks ok to me. 

change db function get_customers_search in '/sales/includes/db/customers_db.inc' to...

function get_customers_search($customer)
{
    global $SysPrefs;

    if (isset($SysPrefs->max_rows_in_search))
        $limit = $SysPrefs->max_rows_in_search;
    else
        $limit = 10;

  $sql = "SELECT d.debtor_no, d.name, d.debtor_ref, d.address, d.tax_id, 
    p.phone, p.phone2, p.fax, p.email 
    FROM ".TB_PREF."crm_persons p, ".TB_PREF."crm_contacts c,  
    ".TB_PREF."debtors_master d
    WHERE p.id = c.person_id AND c.entity_id = d.debtor_no AND 
          c.type = 'customer' AND
    (      d.name LIKE " . db_escape("%" . $customer. "%") . " OR 
     d.debtor_ref LIKE " . db_escape("%" . $customer. "%") . " OR 
          d.address LIKE " . db_escape("%" . $customer. "%") . " OR 
           d.tax_id LIKE " . db_escape("%" . $customer. "%")." OR
            p.phone LIKE " . db_escape("%" . $customer. "%") . " OR 
           p.phone2 LIKE " . db_escape("%" . $customer. "%") . " OR 
              p.fax LIKE " . db_escape("%" . $customer. "%") . " OR 
            p.email LIKE " . db_escape("%" . $customer. "%").")
      ORDER BY name LIMIT 0,".(int)($limit);

    return db_query($sql, "Failed in retreiving customer list.");
}

add fields to table header and cells in '/sales/inquiry/customers_list.php' to have at least phone and email
Header array $th

$th = array("", _("Customer"), _("Short Name"), _("Address"), _("Tax ID"), _("Phone"), _("Email"));

Cell contents add email and phone

      label_cell($myrow["name"]);
      label_cell($myrow["debtor_ref"]);
      label_cell($myrow["address"]);
      label_cell($myrow["tax_id"]);
      label_cell($myrow["phone"]);
      label_cell($myrow["email"]);

@joe and @ apmuthu
?

15

(1 replies, posted in Setup)

Sounds like your accounts won't balance?
retained earnings are usually an equity type of account is account class set in a way you won't balance out when closing your temporary accounts like revenue and expenses?

Here is how I would do it this is a working example on BANKPAYMENT ONLY you would have to do all the cases that you want recorded. ie. fetch that original trans type prior to void, then append data you need to memo.

in ./admin/db/voiding_db.inc:function void_transaction($type, $type_no, $date_, $memo_)
change case ST_BANKPAYMENT to appear like this.

        case ST_BANKPAYMENT : // it's a payment
            if (!exists_bank_trans($type, $type_no))
                return _('Selected transaction does not exists.');
                  $original_trans = db_fetch(get_bank_trans($type, $type_no));
                  $memo_ = $memo_."\nOriginal Amt: ".$original_trans['amount'];
            void_bank_trans($type, $type_no);
            break;

I've tested this and it works adding it to both the voided table and the audit_trail table
Unfortunatly the audit_trail report doesnt include the description in the report but that could be easily added.

I can think of two work arounds for this a dirty way and a better way

dirty way
create a log entry in the function when voided

better way
enter the original amount in the memo to post to audit_trail 'description' and voided 'memo_' in the database

here is the name and location of the void function that you need to do the work. append the original amount to the memo_

./admin/db/voiding_db.inc:function void_transaction($type, $type_no, $date_, $memo_)

here are locations where it is doing the 'Document reentered.' memo specifically

./purchasing/includes/db/invoice_db.inc:        void_transaction($trans_type, $trans_no, $supp_trans->tran_date, _("Document reentered."));
./gl/includes/db/gl_db_banking.inc:    void_transaction(ST_BANKTRANSFER, $trans_no, $date_, _("Document reentered."));
./gl/includes/db/gl_db_banking.inc:        $msg = void_transaction($trans_type, $old_trans, $date_, _("Document reentered."));
./gl/includes/db/gl_journal.inc:        $msg = void_transaction($trans_type, $cart->order_id, Today(), _("Document reentered."));

18

(20 replies, posted in Accounts Receivable)

CAUTION
I just want to give a heads up for people using this.

If you have a client that you have updated the mailing address and you use this copy invoice or delivery. IT WILL NOT HAVE THE NEW ADDRESS. It will copy the mailing address from the prior order so, take caution.

While the order is open you can press F3 to open the branch & verify the current mailing address on file to be safe

Otherwise I have been using daily with no other notes.

function 'get_customer_details' in '/sales/includes/db/customers_db.inc/'

is not counting type ST_JOURNAL or ST_BANKPAYMENT in the calculation for credit for sales orders giving a different result in customer_inquiry balance.

If you would like to add the link and QR to your invoices etc make these changes to core

in "/includes/ui/ui_view.inc" change "if (!isset($payment_services))" to this

if (!isset($payment_services))
{
  $fa_url = "https://".$_SERVER['HTTP_HOST'].strtok($_SERVER['REQUEST_URI'], '?');
  $fa_url = str_replace('/reporting/reports_main.php', '', $fa_url );

  $payment_services = array(
    'PayPal' => "https://www.paypal.com/xclick?business=<company_email>&item_name=<comment>&amount<amount>&currency_code=<currency>",
    'StrikeOut' => $fa_url."/modules/strikeout/pay/?co=<company_no>&amount=<amount>&custId=<reference>",
    'XUMM XRP' => "https://xumm.app/detect/request:{{account}}?amount=<amount>"
  );
}

in "/reporting/includes/doctext.inc" change "if (@$this->formData['payment_service'])" function to this to enable new variables and qr code generation.

    if (@$this->formData['payment_service'])    //payment link
    {
        $amt = number_format($this->formData["ov_freight"] + $this->formData["ov_gst"] + $this->formData["ov_amount"], user_price_dec());
        $service = $this->formData['payment_service'];
        $url = payment_link($service, array(
            'company_email' => $this->company['email'],
            'amount' => $amt,
            'company_no' => user_company(),
            'document_number' => $this->formData['document_number'],
            'currency' => $this->formData['curr_code'],
            'trans_no' => $this->formData['trans_no'],
            'type' => $this->formData['type'],
            'tax_id' => $this->formData['tax_id'],
            'reference' => $this->formData['reference'],
            'comment' => $this->title . " " . $this->formData['reference']
            ));
    $Footer[_("You can pay through"). " $service: "] = "$url";

    if (file_exists("../modules/strikeout/pay/inc/phpqrcode/qrlib.php"))
    {
      include_once("../modules/strikeout/pay/inc/phpqrcode/qrlib.php"); 
        $tmp_file = company_path(). "/pdf_files/". random_id().".png";
        QRcode::png($url, $tmp_file, QR_ECLEVEL_L, 3);
        $this->Image($tmp_file,486,670,100,100);
    }
    }

I have created a payment integration module for frontaccounting called 'strikeout' this was released as a standalone webapp before but decided to make it a direct FA extension

Currently it does 4 methods 1 more coming soon
Pick and choose the methods to enable

Strike (Standard Bitcoin and Bitcoin Lightning invoices) Custodial* Requires Account
Accept bitcoin tx and newer 2017+ lightning (instant global settlement) as the asset or home currency with 0 fees to merchant. Receiving home currency is nice if you don't want to account inventory and capital gains/losses of asset just accept payment. compatiable with all bitcoin wallets including cash app

PayPal (Venmo, PayPal, Afterpay?, & credit cards) Custodial* Requires Account
Popular payment platform that most know

LNbits (Bitcoin Lightning) Non custodial* no account needed can host at home or a friend/family
Accept bitcoin instantly with no banks automatically generate invoices at the time of payment valued at the home currency. all kinds of plugins to trigger actions automatically like spit payroll, convert asset, trigger vending machines. etc

Stripe (Cash APP, EFT, credit cards) Custodial* Requires Account
Another popular payment platform that most know, slightly better on fees and I think a little better than paypal.

BTCPayServer (Standard Bitcoin and Bitcoin Lightning invoices) coming soon* Non custodial* no account needed dont even need to host
Another opensource platform geared towards vendors even has plugins for many webstores big thing here is you can be non custodial without even hosting your it. (standard bitcoin only lightning requires you to host) It has plugins for adding other crypto assets like USDT (digital security version of USD ie. a stable coin) though nothing other than Bitcoin has lots liquidity and is truly censorship resistant.

All platforms will auto enter fa payments and fees if applicable to the gl accounts you set for each for bitcoin there is a choice to inventory.

current limitations/things to do (This is unfinished software)
Clients fees/discounts: are not enabled yet you can enter them for each method but they will not change invoiced amount yet

Currencies: Currently I have it set to USD and BTC for currency this can be changed in code but will add it to the options soon

Fiscal year: if there isnt a fiscal year that matches the date of payment it will create a fiscal year Jan 1st to Dec 31st Pre your create future years to prevent this if you dont do cal year for fiscal year

payment refs: currently it is doing a date for the payment ref num not your preference.

Payment link: This will need to be added to core to support. I have it generating QR's and links on invoices but core payment link is a little odd (unfinished) I might create some custom included reports with the link already enabled (statements, invoices, deliveries etc) @

You can find it in my FA-EXT github here strikeout fork download it in modules and set the methods up api keys etc.

https://github.com/trafficpest/FA24ext … strikeout

I dont have documentation but most of the standalone strikeout wiki docs apply

https://github.com/trafficpest/strikeout/wiki

Oh I am not sure, I never even noticed it. Looks like it calculates differently to make sure the balance sheet will balance and only allows you to do it with journal quick entries? Here is all the code I could find quickly that is ran when it is enabled.

/includes/ui/ui_view.inc

        // quick entry made on account balance is special case.
        if ($qe['bal_type'] == 1) // if this is quick entry based on balance - calculate it
        {
            // Note, that this is ugly hack overriding standard field usage 
            // just to make the feature available between major FA releases!
            $gl_code = $qe['base_desc'];
            $monthly = $qe['base_amount'] == 1.0;

            if (!isset($date))
                $date = Today();

            if ($monthly) // marked as monthly
                $begin = begin_month($date);
            else
            {
                if (is_account_balancesheet($gl_code)) // total
                    $begin = "";
                else
                    $begin = begin_fiscalyear(); // from fiscalyear begin
            }
            $base = get_gl_trans_from_to($begin, $date, $gl_code);

        }

/gl/includes/ui/gl_journal_ui.inc

        if ($qid['bal_type'] == 1)
        {
            $accname = get_gl_account_name($qid['base_desc']);
            label_row(($qid['base_amount'] == 0 ? _("Yearly") : _("Monthly")) . " ". _("balance from account")." ".
                $qid['base_desc']." ".$accname."&nbsp;&nbsp;".submit('go', _("Go"), false, false, true),'', "colspan=2");
        }

/gl/manage/gl_quick_entries.php

    if ($bal_type == 1 && $_POST['type'] != QE_JOURNAL)
    {
        display_error( _("You can only use Balance Based together with Journal Entries."));
        set_focus('base_desc');
        return false;
    }

/gl/manage/gl_quick_entries.php

if (get_post('type') == QE_JOURNAL && get_post('bal_type') == 1)
{
    yesno_list_row(_("Period"), 'base_amount', null, _("Monthly"), _("Yearly"));
    gl_all_accounts_list_row(_("Account"), 'base_desc', null, true);
}

Look here for info on quick entry

https://frontaccounting.com/fawiki/inde … amp;lang=C

You set preset double entries for common transactions to speed up time and make errors less common.

I don't use it much. I use it for payments that are owner draws to to a equity or payments I do often enough. but dont need to track supplier tx/ payable balance just debit the appropriate acct, etc. It works for deposits too but I haven't done that.

If doing a Direct Supplier Invoice (I think what you are talking about)
while creating you can click F2 to add supplier if needed or F4 to add a new inventory item if needed.

Hot keys will be shown on the bottom right of a window

25

(20 replies, posted in Accounts Receivable)

It will auto create a new sales order for you.
It works on delivery or invoice both will make an new order for you.
Im guessing you get a order and schedule a delivery?