Did I find the right examples for you? yes no Crawl my project Python Jobs
All Samples(158) | Call(114) | Derive(0) | Import(44)
src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/BLOrderBook.py Products.BastionLedger(Download)
import logging from Products.BastionBanking.ZCurrency import ZCurrency, CURRENCIES from Products.BastionBanking import ZReturnCode
filter(lambda x: x.taxincluded, obs) ) ) else: return ZCurrency(self.currencies[0], 0)
filter(lambda x: not x.taxincluded, obs) )) else: return ZCurrency(self.currencies[0], 0) def totalAmount(self, datemin, datemax):
return reduce( operator.add, amts ) else: return ZCurrency(self.currencies[0], 0) def _repair(self):
self.opened = DateTime() if not creditlimit: creditlimit = ZCurrency(currency, 0) BLOrderAccount.manage_oaEdit(self, title, description, email, contact, address, phone, fax, discount, creditlimit, terms, notes, shiptoname, shiptoaddress,
src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/LedgerControllerTool.py Products.BastionLedger(Download)
from Products.PageTemplates.PageTemplateFile import PageTemplateFile from Products.BastionBanking.ZCurrency import ZCurrency, CURRENCIES from BLBase import PortalFolder as Folder, ProductsDictionary from BLLedger import BLLedger
rate = portal_currencies.crossMidRate(amount.currency(), currency, effective or DateTime()) return ZCurrency(currency, amount.amount() * rate) else: return ZCurrency(currency, 0)
portal_currencies = getToolByName(self, 'portal_currencies', None) total = ZCurrency(currency, 0) try:
sophisticated processing...) """ tax = ZCurrency(amount.currency(), 0) if taxgrp:
src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/BLPayroll.py Products.BastionLedger(Download)
from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate from Products.AdvancedQuery import Between, In, Eq from Products.BastionBanking.ZCurrency import ZCurrency from Products.CMFCore.permissions import View
assert_currency(salary) except: salary = ZCurrency(salary, self.base_currency) self.salary = salary try: assert_currency(rate) except: rate = ZCurrency(rate, self.base_currency)
results = {} for slot in slots: results[slot.getId()] = ZCurrency(self.base_currency, 0) for timesheet in self.Timesheets.getTimesheets(datemin, datemax): for slot in slots: # # There's something f**ked with the ZCurrency class mathematics ... # results[slot.getId()] += ZCurrency(self.base_currency,
src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/BLTaxTables.py Products.BastionLedger(Download)
from catalog import makeBLTaxTableCatalog from Products.PageTemplates.PageTemplateFile import PageTemplateFile from Products.BastionBanking.ZCurrency import ZCurrency from interfaces.tools import IBLControllerToolMultiple
barrier = self.amount if amount < barrier: return ZCurrency(amount.currency, 0) return (amount - barrier) * self.rate
barrier = self.amount if amount < barrier: return ZCurrency(amount.currency, 0) return (amount - barrier) * rate return amount * rate
if recs: return recs[0].tax(amount) return ZCurrency('%s 0.00' % amount.currency()) tax = ZCurrency('%s 0.00' % amount.currency())
src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/BLShareholderLedger.py Products.BastionLedger(Download)
from Products.PageTemplates.PageTemplateFile import PageTemplateFile from Products.BastionBanking.ZCurrency import ZCurrency from utils import _mime_str, assert_currency
""" if not face: face = ZCurrency('%s 1.00' % self.defaultCurrency()) elif not isinstance(face, ZCurrency): face = ZCurrency(face)
if effective and not isinstance(effective, DateTime): effective = DateTime(effective) total = ZCurrency(self.face.currency(), 0) for allotment in self.allotments(): total += allotment.paid()
if effective and not isinstance(effective, DateTime): effective = DateTime(effective) total = ZCurrency(self.face.currency(), 0) for allotment in self.allotments(): total += allotment.outstanding()
src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/BLTransaction.py Products.BastionLedger(Download)
from Products.PageTemplates.PageTemplateFile import PageTemplateFile from Products.ZCatalog.ZCatalog import ZCatalog from Products.BastionBanking.ZCurrency import ZCurrency from OFS.ObjectManager import BeforeDeleteException from zope.interface import implements
assert_currency(entry.amount) except: entry.amount = ZCurrency(entry.amount) if entry.get('credit', False): entry.amount = -abs(entry.amount)
def debitTotal(self, currency=''): """ sum all the debits """ base = currency or self.aq_parent.defaultCurrency() total = ZCurrency(base, 0.0) for entry in filter(lambda x: x.amount > 0, self.entryValues()):
def creditTotal(self, currency=''): """ sum all the credits - effective is for currency rate(s)""" base = currency or self.aq_parent.defaultCurrency() total = ZCurrency(base, 0.0) for entry in filter(lambda x: x.amount < 0, self.entryValues()):
src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/BLAccount.py Products.BastionLedger(Download)
from utils import floor_date, ceiling_date, assert_currency, isDerived from BLBase import ProductsDictionary, PortalContent, PortalFolder, LargePortalFolder from Products.BastionBanking.ZCurrency import ZCurrency, CURRENCIES from Products.BastionBanking.Exceptions import UnsupportedCurrency from Products.BastionBanking.interfaces.IPayee import IPayee
total = reduce(operator.add, amounts) else: total = ZCurrency(currency or self.base_currency, 0.0) if currency and total.currency() != currency:
""" currency = self.base_currency amount = ZCurrency(currency, 0) for entry in self.entryValues(effective): try:
def zeroAmount(self, currency=''): """ a zero-valued amount in the currency of the account """ return ZCurrency(currency or self.base_currency, 0)
src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/BLInventory.py Products.BastionLedger(Download)
from Products.PythonScripts.standard import newline_to_br from BLBase import * from Products.BastionBanking.ZCurrency import ZCurrency from Products.PageTemplates.PageTemplateFile import PageTemplateFile from Products.ZCatalog.ZCatalog import ZCatalog
self.weight = float(weight) self.onhand = onhand self.listprice = self.lastcost = ZCurrency(defaultcurrency, listprice) self.sellprice = ZCurrency(defaultcurrency, sellprice) self.notes = notes
src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/BLLedger.py Products.BastionLedger(Download)
from BLBase import * from Products.BastionLedger.BLGlobals import EPOCH, ACC_TYPES from Products.BastionBanking.ZCurrency import ZCurrency, CURRENCIES from interfaces.ledger import ILedger, IBLLedger
def add(self, acclist, currency, effective, function): """ apply function to acclist, adding the results """ amount = ZCurrency(currency, 0)
def zeroAmount(self): """ return a zero amount in the default currency of the ledger """ return ZCurrency('%s 0.00' % self.defaultCurrency())
src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/BLQuoteManager.py Products.BastionLedger(Download)
from Products.ZCatalog.ZCatalog import ZCatalog from Products.BastionBanking.ZCurrency import ZCurrency, CURRENCIES from BLBase import *
account.manage_oaEdit(self.company or self.title, self.description, self.email, self.contact, '', self.phone, '', creditlimit = ZCurrency(self.aq_parent.base_currency, 0)) self._updateProperty('accno', accno)
1 | 2 | 3 | 4 | 5 Next