This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p>With globalization in full force, companies have customers, suppliers, investors, and other business partners across the globe. So it's important that business management software supports multiple currency accounting(MCA).</p> | |
<h3 id="whydoweneedmulticurrencyaccounting">1. Why Do We Need Multi-currency Accounting?</h3> | |
<p>Let’s understand this with an example. We, Frappe Technologies Pvt Ltd are based in India and the local currency is INR. We use ERPNext to manage our business(no surprise here :P). Can we post all our transactions in INR to simplify the bookkeeping? For example, when we receive a payment from a client based in a foreign country, can we calculate the amount in INR as of the prevailing exchange rate and post the receipt and be done with it?</p> | |
<p>No, we can’t. And there are multiple reasons for that.</p> | |
<ol> | |
<li>Clients would like to receive the invoice in their currency and not in INR. At the same time, we need to record our income in INR.</li> | |
<li>We need file reports about payments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def cache_result(key, for_user=False, expiry=None): | |
def innerfn(function): | |
def wrapper(*args, **kwargs): | |
_cache = cache() | |
user = None | |
if for_user: | |
user = session.user | |
if kwargs.get("cache"): | |
value = _cache.get_value(key, user=user) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Arrays; | |
import java.util.*; | |
class Marksheet { | |
int roll_no, total; | |
String name; | |
public void set_roll(int roll_number) { | |
roll_no = roll_number; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function add(a, b) { | |
return a + b; | |
} | |
const data = [ | |
{ | |
name: 'A', | |
columns: 3, | |
rows: 3 | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Executing frappe.patches.v11_0.create_contact_for_user in test_site (test_frappe) | |
Traceback (most recent call last): | |
File "/opt/python/2.7.14/lib/python2.7/runpy.py", line 174, in _run_module_as_main | |
"__main__", fname, loader, pkg_name) | |
File "/opt/python/2.7.14/lib/python2.7/runpy.py", line 72, in _run_code | |
exec code in run_globals | |
File "/home/travis/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 97, in <module> | |
main() | |
File "/home/travis/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main | |
click.Group(commands=commands)(prog_name='bench') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors | |
# MIT License. See license.txt | |
from __future__ import unicode_literals | |
import pdfkit, os, frappe | |
from frappe.utils import scrub_urls | |
from frappe import _ | |
from bs4 import BeautifulSoup | |
from PyPDF2 import PdfFileReader, PdfFileWriter | |
import re, io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import datetime | |
from flask import (Flask, flash, redirect, render_template, request, | |
Response, url_for, session) | |
from peewee import * | |
from playhouse.flask_utils import FlaskDB, get_object_or_404, object_list | |
from playhouse.sqlite_ext import * | |
SECRET_KEY = "secret" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Filter by Country | |
<div class="text-center mt-2 mx-auto"> | |
<select id="select-country" onchange="setCountry(this)" style="width: 250px;" class="select-country"> | |
<option value="all">All</option> | |
{% for country in country_list %} | |
<option value="{{ country.name }}">{{ country.name }}</option> | |
{% endfor %} | |
</select> | |
</div> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function awesomeStuff() { … } | |
function done() { … } | |
var Student = function() { | |
this.name = name; | |
} | |
Person.prototype.doWork = function() { | |
do { awesomeStuff(); } while (!done()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
def draw_neural_net(ax, left, right, bottom, top, layer_sizes): | |
''' | |
Draw a neural network cartoon using matplotilb. | |
:usage: | |
>>> fig = plt.figure(figsize=(12, 12)) | |
>>> draw_neural_net(fig.gca(), .1, .9, .1, .9, [4, 7, 2]) | |