Skip to content

Instantly share code, notes, and snippets.

View rmehta's full-sized avatar

Rushabh Mehta rmehta

View GitHub Profile
@rmehta
rmehta / grid_add_row_trigger.js
Created April 7, 2015 06:07
Frappe Custom Script. Trigger on add row
frappe.ui.form.on("Z Item", {
"set_total": function(frm) {
var grand_total = 0;
$.each(frm.doc.z_items, function(i, d) { grand_total += d.qty; });
frm.set_value("grand_total", grand_total);
},
"z_items_add": function(frm, ) {
frm.events.set_total(frm);
},
"qty": function(frm) {
@rmehta
rmehta / v5_release.md
Last active August 29, 2015 14:17
Version 5 Release Notes

Version 5 Release Notes

Fresh New Look

  • Cleaner lines
  • Simpler Menus
  • Indicators

Item Variants

@rmehta
rmehta / stock_reco.js
Created February 17, 2015 07:13
Frappe Version 5 Client Side API
// button click "Get Items"
frappe.ui.form.on("Stock Reconciliation", "get_items", function(frm) {
// prompt user for warehouse
frappe.prompt({label:"Warehouse", fieldtype:"Link", options:"Warehouse", reqd: 1},
function(data) {
// get latest balance and valuation rate
frappe.call({
method:"erpnext.stock.doctype.stock_reconciliation.stock_reconciliation.get_items",
@rmehta
rmehta / gist:d3b568e2793450fd0f86
Last active August 29, 2015 14:13
erpnext_redesign.md

ERPNext Redesign

If you have any doubt that design of everyday things is the most important cultural movement of our time, then you need to look up the most valuable company in the world today, which is ofcourse, Apple. We want our tools to work flawlessly and naturally. Open source projects are catching up too. Elementary OS promises to finally make the Linux Desktop accessible for everyone. Many open source web applications like Ghost CMS, Taiga and the upcoming Flarum have designers in their core team. If you want to take a better look, check out BeautifulOpen.

Taste

A couple of months ago, we decided that we need to refocus on design for our open source ERP project, ERPNext. ERPs are known for having the worst user designs and we wanted to change that. Usability in ERPNext was already better compared to many other products, but we knew we were far away from having

I have known Pratik over 3 years now, first when he joined us as an intern and then as a full time colleague since Sept 2013. In my experience of over 10 years in the software development business, I have found that people are usually specialists (more depth than breadth) or generalists (more breadth than depth), but Pratik is one of those rare persons who combines both breadth and depth. Specially when it comes to computers, operating systems, programming languages and data structures. Not only is he strong in the theory but also has skills to read manuals and install and play with complex technology.

I think this quality will set him apart as a researcher in Computer Science in whichever field he chooses to pursue. At Web Notes, Pratik manages our infrastructure and builds tools for deployment of our product. Our company publishes a cloud based ERP system based on Maria DB and Python and Pratik has been instrumental in making its architecture extremely efficient and robust based on the latest available to

Attribute VB_Name = "ForwardSchedule"
Option Explicit
Public Sub FwdSchedule(ORD As clsOrders, PRD() As clsProducts, RES() As clsResources, TM As clsTimeScale)
Dim RMax&, OMax&, OrderID&
OMax = ORD.Max
frmProgress.lblProgress.Caption = "Forward Scheduling..."
frmProgress.Refresh

D.3 Creating New Classes

The S2S is an extensible framework in which new classes can be created when models with objects describing specific behavior are required. Each new class has to be integrated into the modeling front end and with the rest of the model so that objects of other classes can interact with objects created from the new class.

In order to be integrated with the modeling front-end and the simulation object, it has to implement the interface IModelObject. By implementing this interface, the new class will contain a ModelNode that will keep track of its position in the modeling tree and will also allow other objects to navigate through it.

Creating a new class involves the following steps:

  1. Decide the position of the class in the model tree.
  2. Identify how a new object of the class will be created
@rmehta
rmehta / goi_open_source_initiative.md
Last active October 15, 2015 09:37
What can we expect from Govt of India's new Push into Open Source

What can we expect from Govt of India's new Push into Open Source

The government of India has recently announced a big push into Open Source as a part of its Digital Initiative. For a country of more than a billion people and thousands of government organizations, this seems like a big and long overdue move. This will no doubt give boost to the faltering Free and Open Source Software communities in India. On the face of it, this initiative should not be written off as yet another bureaucratic exercise into nothingness, because the program seems to be headed by an able administrator, RS Sharma, who was a part of the massive Universal ID (UID) project executed by the government of India that has issued bio-metric based IDs to [around 700 million Indians](http://en.wikipe

@rmehta
rmehta / foss_india.md
Last active April 28, 2022 10:13
Indian FOSS Timelines, Organizations and Projects

Indian FOSS: Timelines

This is an attempt to cover the history of Indian FOSS

  • 1984: Richard Stallman creates GNU
  • 1980s: TeX (softare in public domain) introduced into Kerala by Prof. K.S.S. Namburipad of the Department of Mathematics in the University of Kerala. Source
  • 1991: Linus Torvalds releaes Linux Kernel
  • 1996: Atul Chitnis and Kishore Bhargava convince CyberMedia (PC Quest) to distribute Linux CDs. Over a million CDs distributed over a span of 10 years. People stood in queues in front of newstands to get a copy of PCQuest.
  • 1998: PCQ swaps Slackware Linux with Red Hat Linux.
  • 1998-2000: Linux user groups (LUGs) start forming in all major cities [pending: link
@rmehta
rmehta / open_source_erp.md
Last active January 23, 2023 10:57
Building An Open Source ERP

Building An Open Source ERP

Why would someone start a new open source ERP (Enterprise Resource Planning) project, is the question that people ask me again and again. If I knew what it takes, I said, I would not do it! But I did not know that in 2006 when I started to write my own ERP in Python and MySQL. I had just joined my family business (furniture manufacturing) and the company was reeling under a bad ERP implementation. It was a local vendor who was building it out on the .NET platform and after sinking a reasonable sum of money, he was not able to get it right. At that point, my faith in the entire ERP industry was pretty low. Either they were too expensive or they were very buggy.

Later I heard the same story from many of my users. But in all my foolishness and enthusiasm, I started writing out my own ERP system. I was always a hobbyist programmer and maybe I had too much faith in my ability, but somehow we got started. In a couple of years though, the famil