domingo, 5 de fevereiro de 2017

Infor M3 Financial Reports

 

 

I have developed some great financial report tools for Infor M3.
Financial Reports are richer if you can get data to Excel exactly the way you want. If you have data on Excel you can customize your reports, add charts...
This features work with M3 using SQL Server as database. The key is that calculations are made by the server and not by your excel worksheet. This turns calculations faster.

Here is a sample of a Portuguese account balance (Balancete).



Here is a sample of a very simple custom report you can build with this tool.


If this solution interest you please contact.

How does it work?
Simple: you have new functions in Excel to get you data out of M3.

Here is the full set of functions to get data:


M3Balance (Company, Division, AccountingYear, Period, Account, TotalforYear)






















Returns balance for M3 level 1 key. 


























Parameter description












Company -  M3 Company as registered in MNS095.









Division -  M3 Division as registered in MNS100.









AccountingYear - Is the Accounting Year from which the balance is to be obtained.







Period -  Is the period reference for the value to be obtained.








Account- The level 1 key to obtain the balance. This parameter works as StartsWith.







For instance, if you have a key structure like 111 - Account 1; 112 - Account3; .... ; 119 - Account 9, and the 




account parameter is filled with "11" the balance calculated is the balance for all the accounts (111;112;...;119).


TotalforYear -  If filled with "Y" calculates the balance for the year with period less or equal to the selected period. 





Any other value will calculate balance for the refered period only.






















Example













=M3Balance( 1 ,"200", 2016, 6 ,"11","Y")











Calculates the balance for the balance key 1 starting with "11" from period 0 to 6 of the 2010 Year



















=M3Balance( 1 ,"200", 2016, 3 ,"119","P")











Calculates the balance for the balance key 1 starting with "119" from period 3 of the 2010 Year


















M3BalanceDeb (Company, Division, AccountingYear, Period, Account, TotalforYear)






















Returns debt balance for M3 level key 1


























Parameter description












This function uses the same parameters and description as function M3Balance





















M3BalanceCre (Company, Division, AccountingYear, Period, Account, TotalforYear)






















Returns credit balance for M3 level key 1

























Parameter description












This function uses the same parameters and description as function M3Balance





















M3KSBalance (Company, Division, AccountingYear, Period, TotalforYear, BalanceKey, Key1Start, Key1End




 [, Key2Start, Key2End, Key3Start, Key3End , Key4Start, Key4End, Key5Start, Key5End, Key6Start, Key6End, Key7Start, Key7End ] )
















Returns balance for selected M3 balance key using key ranges























Parameter description












Company -  M3 Company as registered in MNS095.









Division -  M3 Division as registered in MNS100.









AccountingYear - Is the Accounting Year from which the balance is to be obtained.







Period -  Is the period reference for the value to be obtained.








TotalforYear -  If filled with "Y" calculates the balance for the year with period less or equal to the selected period. 





Any other value will calculate balance for the refered period only.







BalanceKey -  Is the balance key to be used. Balance Key file can be created in M3 program GLS690.





Key1Start -  Is the starting range for the first key of the selected balance key.







Key1End -  Is the finish range for the first key of the selected balance key.







[Key2Start] -  Optional parameter for 2nd key start range for the selected balance key.






[Key2End] -  Optional parameter for 2nd key end range for the selected balance key.






[Key3Start] -  Same as Key2Start but for 3rd Key.









[Key3End] -  Same as Key2End but for 3rd Key.









[Key4Start] -  Same as Key2Start but for 4th Key.









[Key4End] -  Same as Key2End but for 4th Key.









[Key5Start] -  Same as Key2Start but for 5th Key.









[Key5End] -  Same as Key2End but for 5th Key.









[Key6Start] -  Same as Key2Start but for 6th Key.









[Key6End] -  Same as Key2End but for 6th Key.









[Key7Start] -  Same as Key2Start but for 7th Key.









[Key7End] -  Same as Key2End but for 7th Key.























M3KSBalanceDeb (Company, Division, AccountingYear, Period, TotalforYear, BalanceKey, Key1Start, Key1End




 [, Key2Start, Key2End, Key3Start, Key3End , Key4Start, Key4End, Key5Start, Key5End, Key6Start, Key6End, Key7Start, Key7End ] )
















Returns Debt balance for selected M3 balance key using key ranges























Parameter description












This function uses the same parameters and description as function M3KSBalance





















M3KSBalanceCre (Company, Division, AccountingYear, Period, TotalforYear, BalanceKey, Key1Start, Key1End




 [, Key2Start, Key2End, Key3Start, Key3End , Key4Start, Key4End, Key5Start, Key5End, Key6Start, Key6End, Key7Start, Key7End ] )
















Returns Credit balance for selected M3 balance key using key ranges























Parameter description












This function uses the same parameters and description as function M3KSBalance







sexta-feira, 6 de maio de 2016

Sharepoint 2013 Dropdown list populated from another sharepoint list

This is my solution to dynamically fill a filter dropdown list based on another sharepoint list field

1- Define a folder to place javascript files. I used the following path:
"~sitecollection/_catalogs/masterpage/Display Templates/"

2- Upload the following files to the location you defined on step 1. Use the import files button on your sharepoint designer.



File 1: the jquery library.
File 2: the jquery SP Service library. 
File 3: The custom code for the dropdown list

3 - Use the designer to edit the default list form for New Item (in this case nx.aspx)

4 - Add the following references to forms design. 

<SharePoint:ScriptLink ID="jquery" runat="server" LoadAfterUI="True" Name="~sitecollection/_catalogs/masterpage/Display Templates/jquery-1.12.3.js"/>

<SharePoint:ScriptLink ID="spservices" runat="server" LoadAfterUI="True" Name="~sitecollection/_catalogs/masterpage/Display Templates/jquery.SPServices-2014.02.js"/>
 

<SharePoint:ScriptLink ID="trsp" runat="server" LoadAfterUI="True" Name="~sitecollection/_catalogs/masterpage/Display Templates/CostumDropdown.js"/>

Note that you should update the path if you uploaded the scripts into a different path.


 A good place for you to drop this lines of code is before the form table. Search for <Sharepoint:FormField and FieldName=the first field of your form. Paste the lines before the first <tr> as shown above.

5 - Identify the html element id of the field you wish to apply your dropdown list



6 - Using the Sharepoint designer Edit the custom javascript (file 3 uploaded on step 2).

$(document).ready(function(){
    add_dropdown("lista1", "ctl00_ctl26_g_928acec0_5b91_4790_a300_9119e1116afe_ff21_ctl00_ctl00_TextField","http://w2012sharep/sites/ETN/Contactos/","Contactos",  "Company" );
});


You only need to update the entry parameters for add_dropdown function:
1 - Name of the list (must be different for each dropdown)
2 - Element id you have reached in step 5.
3 - URL where the source of your dropdown list is.
4 - Name of the sharepoint list
5 - Name of the field on the source list


To add a new dropdown just copy the call for the function
$(document).ready(function(){
    add_dropdown("lista1", "ctl00_ctl26_g_928acec0_5b91_4790_a300_9119e1116afe_ff21_ctl00_ctl00_TextField","http://w2012sharep/sites/ETN/Contactos/","Contactos",  "Company" );


    add_dropdown("lista2", "ctl00_ctl26_g_928acec0_5b91_4790_a300_9119e1116afe_ff21_ctl00_ctl00_TextField","http://w2012sharep/sites/ETN/Contactos/","Contactos",  "Phone" );

});



And your set to go.



















quinta-feira, 28 de abril de 2016

Sharepoint - Set current user to a form field as a default value

This is my solution to set the current user as a default value of a Sharepoint 2013 form field.

1- Define a folder to place javascript files. I used the following path:
"~sitecollection/_catalogs/masterpage/Display Templates/"

2- Upload the following files to the location you defined on step 1. Use the import files button on your sharepoint designer.



File 1: the jquery library.
File 2: the jquery SP Service library.
File 3: the custom javascript for the field you want to update.


Edit the file 3 in sharepoint designer after import (or in another editor before import) and replace 'Req' by the name of your field name in the list:
var fieldName = 'Req';

3 - Use the designer to edit the default list form for New Item (in this case nx.aspx)

4 - Add the following references to forms design. 

<SharePoint:ScriptLink ID="jquery" runat="server" LoadAfterUI="True" Name="~sitecollection/_catalogs/masterpage/Display Templates/jquery-1.12.3.js"/>

<SharePoint:ScriptLink ID="spservices" runat="server" LoadAfterUI="True" Name="~sitecollection/_catalogs/masterpage/Display Templates/jquery.SPServices-2014.02.js"/>
 

<SharePoint:ScriptLink ID="trsp" runat="server" LoadAfterUI="True" Name="~sitecollection/_catalogs/masterpage/Display Templates/trsp.js"/>

Note that you shloud update the path if you uploaded the scripts into a different path.


 A good place for you to drop this lines of code is before the form table. Search for <Sharepoint:FormField and FieldName=the first field of your form. Paste the lines before the first <tr> as shown above.


5 - Disable minimum download strategy

If you try to run your form you will experience that the code works just sometimes and not every time. You should disable minimum download strategy feature. To do this go to site settings, manage site features and disable it.


And we are done!
Here is my sample on field "Req"


quarta-feira, 13 de abril de 2016

Magento 2.0 csv file Translation Portuguese / Tradução para Português do Magento 2.0

For the translation of Magento to Portuguese please download the file below and place it in:

Para a tradução para Português do Magento 2.0 faça download do ficheiro abaixo e coloque em:

/opt/bitnami/apps/magento/htdocs/app/design/frontend/Magento/luma/i18n



quinta-feira, 21 de agosto de 2014

Lubuntu view Trash on Desktop

Trash Can is by default hidden on Lubuntu.

To activate the trash on the desktop click on your Start Menu and on Preferences Select "Desktop Preferences". Then click on Tab "Desktop Items" and activate the option Show "Trash Can" folder on the desktop.





segunda-feira, 18 de agosto de 2014

Lubuntu - Easy set up a system

After installing Lubuntu you will need some standard apps to start working.
You can easily setup some standard applications by using simple command line language.
Click on the start menu and roll over system tools and choose UXTerm.

The syntax to install software is then following
sudo apt-get install <application>

A simple example how to install skype is this simple command line
sudo apt-get install skype 
(You can select the above line and copy. To paste into the the UXTerm press the mouse-wheel to paste)
Assuming that your password is not blank, you will be prompted at least once for your sudo/administrator password.

Here is a quick list of some useful applications to start working with Lubuntu
sudo apt-get install apache-openoffice - will install openoffice applications suite
sudo apt-get install skype - will install popular skype for instant messaging and video calls
sudo apt-get install chrome-browser - will install Google Chrome Browser
sudo apt-get install gimp - will install freeware gimp for image handling.

Please help me complete this list. Make a suggestion for the missing apps in the comments.
Thanks.




terça-feira, 3 de dezembro de 2013

Windows Profile (User Settings) Failure

Problem Environment: General Windows

Sometimes if the a crash happens on your windows your profile get's damaged.
You desktop files and all settings are missing and you appear to be in a totally new profile.

Most cases I experienced can be solved simply.

Here is my solution:

  1. Open My Computer
  2. On your system installation (usually C:) right click and select properties.
  3. Click on Tools Tab
  4. Click on error checking button
  5. Select option Automatically fix file system errors
  6. You will be prompted to run this maintenance at next reboot. Click ok
  7. Reboot
The reboot will fix file and disk errors. After this your profile should be again usable.