Big difference account with big impact in Microsoft Dynamics Retail

Today while working on one of our retail client we got an error on statement Posting on their retail store “Account number for transaction type Ledger journal does not exist”.

During debugging, i have found that in RetailStatementPost.PostPayment method the big difference account was not picking by the system for different payment types.This method posts the difference amount, bank drop, safe drop, card fee and tenders.

In our scenario the difference amount was found against cash and bank payment types and maximum difference amount was set to 0.00 against store. For payment type cash and bank the system was posting the difference amount to big difference account which was also not setup on the store. This missing account was leading to error “Account number for transaction type Ledger journal does not exist”.


In case difference goes beyond specified maximum difference that amount will be posted into Big difference account. Need to select account number.

big difference blank


Navigation of Big difference account setup is following:

Retail Store -> Setup -> Payment methods

After setting the Big difference account for payment type cash and bank on store the statement posted without any error and difference amount posted to specified account.

Microsoft Dynamics 365 FO extensions – forms, classes, reports

Hey guys, I am back with a Microsoft Dynamics 365 (D365) for Finance and Operations blog. In D365 to overcome over layering Microsoft introduced Extensions. So that’s what my blog will be about.
Lets start with class extension. So what do you do if you need to add a new method to a standard class? Well we create class extension. For this example we will create an extension of the class “SalesConfirmDP” and add a new method to this class. To do so first create a new class in you VS project like you normally do:


Add the final key word and the annotation [ExtensionOf(“ClassName”))]:


Now add your new method to this class:


This is how you add new methods to the class.
Now you can also extend forms
To do that right click on the form you want to extend in the AOT and select “Create extension”


A new extension form will be added to your project. Right click and select “Open”


Now you can add custom controls to your new form


Customizing reports is also a little different in D365 for Finance and Operations. Now what you do is duplicate the report. We take the example of “PurchRanking”. Right click on the AOT and select “Duplicate in project”


Make your customization to the report and deploy


This report is attached to a menu item, so we will have to extend the menu item and attach is to our new duplicate report. Right click the menu item and select “Create extension”


Set the menu item property “Object” to your new report:


Now run the report and you will see your new custom design.

That’s all for this blog guys. I will be back with more.

Heat/Temperature Monitoring Using Windows Iot 10 core, Raspberry PI 3 and BMP 280


Hello and welcome to the series of tutorials for internet of things (Iot) .if you are complicate choosing Raspberry Pi or Arduino for your Iot project read this article.

So without further due here are Prerequisite for this tutorial.


  • Raspberry PI 3 (Pi 2 model B will also work)
  • BMP 280 sensor ( Buy from Ebay)
  • Bread Board
  • Male/Female jumper wires


  • Windows 10 Iot core
  • Visual studio 2015

About BMP 280:-

This Bmp 280 sensor you can buy from Ebay or ali Express which is low cost well it is less reliable and less robust. I already burned 2 of them one by holding lighter closed to it, another by putting it on a car dashboard for a while and 1 of them is malfunction so they are not guaranteed to be long lasting.

Setup Hardware.

Ok. Connect the 4 jumper wire to raspberry Pi3 through bread board

  • BMP 280 vcc to Pi 5 pin voltage
  • BMP 280 GND to Pi GND
  • BMP 280 SDA Pin to Pi GPIO 2 (adjacent to 5v Pin)
  • BMP 280 SCL Pin to Pi to GPIO 3 (adjacent to Gnd Pin)

Here’s Schematic and physical image for your ease.




And the Rest…Software:

Open Visual studio 2015 create new blank windows Universal app. and give it a name.


Add the reference for Windows IoT Extensions for UWP” Windows Universal Extension.


Add class BMP 280 to your solution.

Note:-this sensor is full of surprises after much testing I found out its register header is 0x76 rather than 0x77 so change it in BMP 280 class.


Time to make a meaningful UI which looks like this:


Application Flow:

On start analyzing button timer will kick off and start showing temperature.

On stop analyzing button timer will stop and resets all variables.

User can set threshold and once it’s exceeded it will start adding in list

add the following methods in MainPage.xaml.cs

protected override async void OnNavigatedTo(NavigationEventArgs navArgs)



//Create a new object for our barometric sensor class

BMP280 = new BMP280();

//Initialize the sensor

await BMP280.Initialize();



_timer = new DispatcherTimer();

_timer.Interval = TimeSpan.FromSeconds(1);

_timer.Tick += _timer_Tick;



catch (Exception ex)





private async void _timer_Tick(object sender, object e)


temper = await BMP280.ReadTemperature();

pressure = await BMP280.ReadPreasure();

altitude = await BMP280.ReadAltitude(seaLevelPressure);

if (temper != 0 && Thresholdtemp != 0 && temper > Thresholdtemp)


float tempdiff = temper - Thresholdtemp;

thresherror.Items.Add("Temperature has exceeded threshold by " + tempdiff + " deg C at " + DateTime.Now);


if (pressure != 0 && Thresholdpress != 0 && pressure > Thresholdpress)


float pressdiff = pressure - Thresholdpress;

thresherror.Items.Add("Pressure has exceeded threshold by " + pressdiff + " Pascal at " + DateTime.Now);



if (altitude != 0 && Thresholdaltid != 0 && altitude > Thresholdaltid)


float altidiff = altitude - Thresholdaltid;

thresherror.Items.Add("Altitude has exceeded threshold by " + altidiff + " meter at " + DateTime.Now);


// Write the values to your debug console

Debug.WriteLine("Temperature: " + temper.ToString() + " deg C");

Debug.WriteLine("Pressure: " + pressure.ToString() + " Pa");

Debug.WriteLine("Altitude: " + altitude.ToString() + " m");


temp.Text = temper.ToString() + " C";

press.Text = pressure.ToString() + " Pa";

altid.Text = altitude.ToString() + " m";





private void SetValues(object sender, RoutedEventArgs e)


if (threshtemp.Text != string.Empty)


Thresholdtemp = float.Parse(threshtemp.Text);

threshtemp.IsEnabled = false;


if (threshpress.Text != string.Empty)


Thresholdpress = float.Parse(threshpress.Text);

threshpress.IsEnabled = false;


if (threshaltid.Text != string.Empty)


Thresholdaltid = float.Parse(threshaltid.Text);

threshaltid.IsEnabled = false;






private void StartAnalysing(object sender, RoutedEventArgs e)





private void StopAnalysing(object sender, RoutedEventArgs e)



temp.Text = "";

press.Text = "";

altid.Text = "";

threshtemp.Text = "";

threshpress.Text = "";

threshaltid.Text = "";

threshtemp.IsEnabled = true;

threshpress.IsEnabled = true;

threshaltid.IsEnabled = true;

temper = 0;

pressure = 0;

altitude = 0;

Thresholdtemp = 0;

Thresholdpress = 0;

Thresholdaltid = 0;



  • On OnNavigatedTo initialize timer and BMP 280 object
  • On _timer_Tick it will read temperature and pressure and checks if it exceeds its limit add it in list. and finally display temp pressure and altitude in text boxes
  • On SetValues sets threshold values
  • On StartAnalysing kicks off the timer
  • On StopAnalysing stops timer and resetting its variable

Here is the output:


Next I will show the same thing using DHT11/DHT22 with comparison between them in the end.

So stay tuned for more blog coming up.

Fixed asset depreciation reversal issue in Microsoft Dynamics NAV

Hello folks,

While working with one of Microsoft Dynamics NAV customers I came to know of an interesting issue related to fixed asset depreciation.

I have used CRONUS demo database to reproduce and fix this issue.

Exact problem was that users was not able to run and create depreciation entries, once user executed calculate depreciation process below popup appeared:


After investigation I found that instead of performing the function of Cancellation user did reversal of fixed asset transactions which caused this issue. Due to this fixed asset last depreciation run date was not changed when depreciation transaction was reversed.

See below screen shot, here asset was acquired on 1-Jan-2018 and depreciation date is 31-Jan-2018.


However fixed asset depreciation transaction was reversed on same date. See below:


Solution for this was to cancel both depreciation transactions (Original and reversed) and then calculate and post depreciation again. Once a transaction is cancelled it is going to be removed from fixed asset ledger entries form, further last depreciation run date is also updated and in my case it is blank as this is first depreciation. See below:


See below, I have cancelled both transactions and the performed depreciation again.


Hence issue is resolved. Remember not to perform reversal function for fixed asset transactions to avoid such issues.

In case you face further issues please comment below and I’ll be more than happy to assist:)

Warehousing in Microsoft Dynamics NAV Part I


A warehouse is a locality for keeping items, catering the needs for manufacturing, imports, exports, wholesales, transport, retail etc. Comprises of pick & drop ports, residing usually alongside different kinds of harbors. Possesses handling instruments as per essentials of the nature of objects.


Some Features

  • Warehouse Receipt
  • Put-A-Ways
  • Internal Picks
  • Warehouse Shipment


v Locations

In NAV, one of the essentials is location, which can be a production plant, showroom, retail store, distribution center etc. In this instance, it is a warehouse therefore; the user will utilize the selections provided in the warehousing fast tab as per requirements, and to unique the locations from each other.



v Warehouse Employee

In order to work and grasp the documents the user has to be a warehouse employee. Otherwise, system will not consent the user to have a look at the forms.


v Creating Bins

Bins has to be created within the warehouse for the purpose of tracking & storing the items as dedicated, default, fixed & floatable. Bins represents shelves in warehouse where items have placed.


Receive & Put-away

For utilizing the warehousing features, the user should receive a purchase order in such a location where the warehousing options exposed above are marked for application. In the Action tab, within the warehouse group of the ribbon, user should consume the option Create Whse. Receipt to receive the PO in the particular warehouse instead of using the Post option within the posting group of the ribbon. Which typically used for receiving in location not using warehouse features.


After that, user would search for the Warehouse Receipts list page & explore the receipt created by the system recently. In the window opened, user would easily observe that system is showing only the quantity received and not the amounts of purchasing, since it is a warehousing document. Moreover, the user will now post the receipt by using option Post Receipt provided in posting group of the home tab in the ribbon.


The above illustration shows that as soon the document have posted, the system has generated a put-away activity by its own so that the quantity received can be moved to an appropriate destination for efficient or designated storage if any.

Now the user should search out for Unassigned Put-Away list page & expose the fresh formed put-away. Next, user will observe the open page consist of two lines instead of one, distinguished by three fields Action type, Zone code & bin code.


Which guides the user from where the quantity has to be receive as well as placed in which bin, shelf or rack of the warehouse. At this point, the system will suggest the bin as per configuration but user also has the liberty not to use the system suggestion & assign a different bin for the content placement. By using the possibility, Register Put-Away in the ribbon user will put the content in the bin, which will increase the inventory in the items list.



Picking & Shipment

Now the discussion will comprise of how to pick from warehouse of the same location in command to ship the quantity in contradiction of a sales order. To perform this activity and create a shipment document, option Create Warehouse Shipment must bring into usage, conveying in familiarity of warehouse that required quantity has to pick & ship to the customer.


Next, the user will search out for Warehouse Shipments list page in order to sightsee the new produced document, for safe side quantity have to check & since it is a warehouse document, it does not contain the amounts. Now the user will use the Create Pick option from the pick group of the ribbon in order to tell the system who will pick the desired items or user can leave it blank so that any warehouse employee can pick it.



From the above image, observe that the system has generated a picking activity, which a user can find as Picks on searching in system. The fact to notice over here is that the shipment has been released but not been picked yet. Therefore the document status in the below diagram is empty.


On reconnoitering the fashioned pick, the user will yet again find two lines instead of one. From two lines system has shown, from where the quantity will be picked & placed for the shipment, on the same form the user will use the option of Autofill Quantity To Handle from the prepare group of the ribbon to tell the system that both the quantities will be handled at same time. After that, registration of the items should take place, employing the Register Pick, option from the ribbon.


Subsequently registering the items, user can observe the shipment is now been picked completely & the document status has been changed to Completely Picked.


As per walk around this manuscript, the user will get the preference to Post the shipment, which usually appears quickly if warehousing features, not been utilized on the desired locations.


Later sending, the shipment user can observe the change in inventory by reaching out for items & check the bin content of the item shipped, which has reduced by the shipping quantity.