Altered the convert sql to drop ParentLedgerID from Ledgers

Changed Ledger to Account in ui and made the list and detail form + view angular.
Added partial static view for AngularJS templates
Added services / routes for user permissions and account types
Removed post_voucher and delete_voucher route as they are no longer needed
Added Account / Ledger / Permission / Cost Center / Account Type service in angular
Added routes for /Accounts
Disabled the debug toolbar
This commit is contained in:
Tanshu 2012-10-11 17:26:51 +05:30
parent 9ef3f751f9
commit 427f667f3a
47 changed files with 750 additions and 2056 deletions

@ -1,11 +1,18 @@
UPDATE entities_vouchers SET date = date || ".000000", lasteditdate = lasteditdate || ".000000", creationdate = creationdate || ".000000";
UPDATE entities_attendances SET date = date || ".000000", creationdate = creationdate || ".000000";
UPDATE entities_fingerprints SET date = date || ".000000";
ALTER TABLE "Entities_Ledgers" ADD COLUMN "ledger_type" nvarchar(50) NOT NULL DEFAULT "";
ALTER TABLE "Entities_Batches" RENAME TO "Entities_Batches_old";
CREATE TABLE "Entities_Batches" ("BatchID" guid NOT NULL ,"Name" nvarchar(50) NOT NULL ,"ProductID" guid,"QuantityRemaining" numeric NOT NULL ,"Rate" numeric NOT NULL ,"Tax" numeric NOT NULL ,"Discount" numeric NOT NULL, PRIMARY KEY ([BatchID]));
INSERT INTO "Entities_Batches" SELECT "BatchID","Name","ProductID","QuantityRemaining","Rate","Tax","Discount" FROM "Entities_Batches_old";
DROP TABLE "Entities_Batches_old";
ALTER TABLE "Entities_Ledgers" RENAME TO "Entities_Ledgers_old";
CREATE TABLE "Entities_Ledgers" ("LedgerID" guid NOT NULL, "Code" integer NOT NULL, "Name" nvarchar(255) NOT NULL COLLATE NOCASE, "Type" integer NOT NULL, "ledger_type" nvarchar(50) NOT NULL, "IsActive" bit NOT NULL, "CostCenterID" guid,
PRIMARY KEY ([LedgerID]),
FOREIGN KEY ([CostCenterID]) REFERENCES [Entities_CostCenters]([CostCenterID])
);
INSERT INTO "Entities_Ledgers" SELECT "LedgerID", "Code", "Name", "Type", '', "IsActive", "CostCenterID" FROM "Entities_Ledgers_old";
UPDATE "Entities_Ledgers" SET ledger_type = 'employees' where type = 10;
ALTER TABLE "main"."Entities_Batches" RENAME TO "Entities_Batches_old";
CREATE TABLE "main"."Entities_Batches" ("BatchID" guid NOT NULL ,"Name" nvarchar(50) NOT NULL ,"ProductID" guid,"QuantityRemaining" numeric NOT NULL ,"Rate" numeric NOT NULL ,"Tax" numeric NOT NULL ,"Discount" numeric NOT NULL );
INSERT INTO "main"."Entities_Batches" SELECT "BatchID","Name","ProductID","QuantityRemaining","Rate","Tax","Discount" FROM "main"."Entities_Batches_old";
DROP TABLE "main"."Entities_Batches_old";
DROP TABLE "Entities_Ledgers_old";

@ -39,6 +39,7 @@ def main(global_config, **settings):
config.add_static_view('script', 'brewman:static/scripts')
config.add_static_view('css', 'brewman:static/css')
config.add_static_view('pictures', 'brewman:static/pictures')
config.add_static_view('partial', 'brewman:static/partial')
config.add_route('login', '/login')
config.add_route('logout', '/logout')
@ -56,9 +57,9 @@ def main(global_config, **settings):
config.add_route('cost_center', '/CostCenter')
config.add_route('cost_center_list', '/CostCenters')
config.add_route('ledger_id', '/Ledger/{id}')
config.add_route('ledger', '/Ledger')
config.add_route('ledger_list', '/Ledgers')
config.add_route('account_id', '/Account/{id}')
config.add_route('account', '/Account')
config.add_route('account_list', '/Accounts')
config.add_route('product_id', '/Product/{id}')
config.add_route('product', '/Product')
@ -97,6 +98,8 @@ def main(global_config, **settings):
config.add_route('display_ledger_id', '/Reports/DisplayLedger/{id}')
config.add_route('display_ledger', '/Reports/DisplayLedger')
config.add_route('json_display_ledger', '/json/Ledger/{id}')
config.add_route('product_ledger_id', '/Reports/ProductLedger/{id}')
config.add_route('product_ledger', '/Reports/ProductLedger')
@ -130,6 +133,9 @@ def main(global_config, **settings):
config.add_route('services_product_rate', '/Services/ProductRate')
config.add_route('services_product_add_inventory', '/Services/AddInventory')
config.add_route('user_permissions', '/Permissions')
config.add_route('account_type_list', '/AccountTypes')
config.add_route('services_batch_list', '/Services/Batches')
config.add_route('services_batch_add_inventory', '/Services/AddBatch')
@ -137,8 +143,6 @@ def main(global_config, **settings):
config.add_route('voucher', '/Voucher/{id}')
config.add_route('voucher_new', '/Voucher')
config.add_route('post_voucher', '/Services/Post/{id}')
config.add_route('delete_voucher', '/Services/Delete/{id}')
config.add_route('is_user_in_role', '/Services/IsUserInRole/{id}')
config.add_route('is_user_in_roles', '/Services/IsUserInRoles')

@ -1,6 +1,6 @@
import string
from brewman.views.nav_bar import login_menu, report_menu, voucher_menu, entry_menu, employee_menu, ledger_menu, product_menu
from brewman.views.nav_bar import login_menu, report_menu, voucher_menu, entry_menu, employee_menu, account_menu, product_menu
class Form(object):
"""Make absolute URL from the relative one.

@ -11,3 +11,29 @@ Base = declarative_base()
def initialize_sql(engine):
DBSession.configure(bind=engine)
Base.metadata.bind = engine
def populate():
""" Populate initial data and table structure
"""
pass
# try:
# Base.metadata.create_all(engine)
# session = DBSession()
#
# home = Sitmap('Home','/', 1)
# session.add(home)
# login = Sitmap('Login','/Login', 2)
# session.add(login)
# logout = Sitmap('Logout','/Logout', 3)
# session.add(logout)
#
# session.add(Sitemap('Sub1',/Sub1',1,home.id))
# session.add(Sitemap('Sub2',/Sub2',2,home.id))
# session.add(Sitemap('Sub3',/Sub3',1,login.id))
# session.add(Sitemap('Sub4',/Sub4',1,login.id))
#
# session.flush()
# transaction.commit()
# except IntegrityError:
# transaction.abort()
#

@ -138,6 +138,14 @@ class CostCenter(Base):
def cost_center_kitchen(cls):
return uuid.UUID('b2d398ce-e3cc-c542-9feb-5d7783e899df')
@classmethod
def cost_center_overall(cls):
return uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d')
@classmethod
def overall(cls):
return {'CostCenterID': uuid.UUID('36f59436-522a-0746-ae94-e0f746bf6c0d'), 'Name': 'Overall'}
class LedgerBase(Base):
__tablename__ = 'entities_ledgers'
@ -147,7 +155,6 @@ class LedgerBase(Base):
name = Column('Name', Unicode(255), unique=True)
type = Column('Type', Integer, nullable=False)
ledger_type = Column('ledger_type', Unicode(50), nullable=False)
parent_ledger_id = Column('ParentLedgerID', GUID())
is_active = Column('IsActive', Boolean)
costcenter_id = Column('CostCenterID', GUID(), ForeignKey('entities_costcenters.CostCenterID'))
@ -163,11 +170,10 @@ class LedgerBase(Base):
def type_object(self):
return LedgerType.by_id(self.type)
def __init__(self, code=None, name=None, type=None, parent_ledger_id=None, is_active=None, costcenter_id=None):
def __init__(self, code=None, name=None, type=None, is_active=None, costcenter_id=None):
self.code = code
self.name = name
self.type = type
self.parent_ledger_id = parent_ledger_id
self.is_active = is_active
self.costcenter_id = costcenter_id
@ -202,6 +208,12 @@ class LedgerBase(Base):
DBSession.add(self)
return self
@classmethod
def get_code(cls, type):
code = DBSession.query(func.max(LedgerBase.code)).filter(LedgerBase.type == type).one()[0]
return 1 if code is None else code + 1
@classmethod
def all_purchases(cls):
return uuid.UUID('240dd899-c413-854c-a7eb-67a29d154490')
@ -251,6 +263,10 @@ class Employee(LedgerBase):
class Ledger(LedgerBase):
__mapper_args__ = {'polymorphic_identity': ''}
@classmethod
def list(cls):
return DBSession.query(Ledger).order_by(Ledger.type).order_by(Ledger.name).order_by(Ledger.code).all()
class AttendanceType:
def __init__(self, id, name, value=None):

@ -1,56 +0,0 @@
from brewman.models.user import User
from brewman.models.sitemap import Sitemap
import transaction
# import cryptacular.bcrypt
from datetime import datetime, date
from sqlalchemy import Column
from sqlalchemy import Integer
from sqlalchemy import Unicode
from sqlalchemy import Date
from sqlalchemy import DateTime
from sqlalchemy.exc import IntegrityError
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship
from sqlalchemy.orm import scoped_session
from sqlalchemy.orm import sessionmaker
from sqlalchemy.orm import synonym
from sqlalchemy.schema import ForeignKey
from zope.sqlalchemy import ZopeTransactionExtension
# crypt = cryptacular.bcrypt.BCRYPTPasswordManager()
DBSession = scoped_session(sessionmaker(extension=ZopeTransactionExtension()))
Base = declarative_base()
def populate():
session = DBSession()
home = Sitmap('Home','/', 1)
session.add(home)
login = Sitmap('Login','/Login', 2)
session.add(login)
logout = Sitmap('Logout','/Logout', 3)
session.add(logout)
session.add(Sitemap('Sub1',/Sub1',1,home.id))
session.add(Sitemap('Sub2',/Sub2',2,home.id))
session.add(Sitemap('Sub3',/Sub3',1,login.id))
session.add(Sitemap('Sub4',/Sub4',1,login.id))
session.flush()
transaction.commit()
def initialize_sql(engine):
DBSession.configure(bind=engine)
Base.metadata.bind = engine
# Base.metadata.create_all(engine)
try:
populate()
except IntegrityError:
transaction.abort()

@ -0,0 +1,52 @@
<form method="post" class="form-horizontal" ng-controller="AccountCtrl">
<legend>Account Edit / New</legend>
<div class="control-group">
<label for="txtCode" class="control-label">Code</label>
<div class="controls">
<input type="text" id="txtCode" class="non-search-box" disabled="disabled" ng-model="account.Code"/>
</div>
</div>
<div class="control-group">
<label for="txtName" class="control-label">Name</label>
<div class="controls">
<input type="text" id="txtName" ng-model="account.Name"/>
</div>
</div>
<div class="control-group">
<label for="ddlType" class="control-label">Type</label>
<div class="controls">
<select id="ddlType" class="select-box" ng-model="account.Type"
ng-options="l.AccountTypeID as l.Name for l in account_types"> </select>
</div>
</div>
<div class="control-group">
<div class="controls">
<label class="checkbox">
<input type="checkbox" ng-checked="account.IsActive"> Is Active
</label>
</div>
</div>
<div class="control-group">
<label for="ddlCostCenter" class="control-label">Cost Center</label>
<div class="controls">
<select id="ddlCostCenter" class="select-box" ng-model="account.CostCenter.CostCenterID"
ng-options="l.CostCenterID as l.Name for l in cost_centers"> </select>
</div>
</div>
<div class=" control-group" id="add">
<div class="controls">
<button ng-click="save()">Save</button>
</div>
</div>
</form>

@ -0,0 +1,19 @@
<legend>Accounts</legend>
<table class="clean-table" ng-controller="AccountListCtrl">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Is Active?</th>
<th>Cost Center</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in info">
<td><a href="{{item.Url}}">{{item.Name}}</a></td>
<td>{{item.Type}}</td>
<td>{{item.IsActive}}</td>
<td>{{item.CostCenter}}</td>
</tr>
</tbody>
</table>

@ -0,0 +1,28 @@
function AccountListCtrl($scope, Account) {
$scope.info = Account.query();
}
function AccountCtrl($scope, $routeParams, Account, AccountType, CostCenter) {
$scope.account = Account.get({id: $routeParams.id});
$scope.account_types = AccountType.query();
$scope.cost_centers = CostCenter.query();
$scope.save = function () {
$scope.account.$save(function (u, putResponseHeaders) {
$scope.toasts.push({Type:'Success', Message:u.Code});
}, function (data, status) {
$scope.toasts.push({Type:'Error', Message:data.data});
});
};
$scope.delete = function () {
$scope.account.$delete(function (u, putResponseHeaders) {
$scope.toasts.push({Type:'Success', Message:''});
}, function (data, status) {
$scope.toasts.push({Type:'Error', Message:data.data});
});
};
$('#txtLedger').focus();
}

@ -33,7 +33,7 @@ overlord_directive.directive('autocomplete', function () {
scope.selname = ui.item.label;
scope.selid = ui.item.id;
if (typeof ui.item.price !== 'undefined'){
if (typeof ui.item.price !== 'undefined') {
scope.selprice = ui.item.price;
}
scope.$apply();
@ -94,8 +94,10 @@ overlord_directive.directive('datepicker', function () {
element.datepicker({
dateFormat:'dd-M-yy',
onSelect:function (dateText, inst) {
scope[attrs.model][attrs.prop] = dateText;
scope.$apply();
if (typeof attrs.model !== 'undefined') {
scope[attrs.model][attrs.prop] = dateText;
scope.$apply();
}
}
});
}
@ -112,8 +114,8 @@ overlord_directive.directive('fadey', function () {
element.hide();
element.fadeIn(duration)
scope.destroy = function(complete) {
element.fadeOut(duration, function() {
scope.destroy = function (complete) {
element.fadeOut(duration, function () {
if (complete) {
complete.apply(scope);
}

@ -76,7 +76,35 @@ overlord_service.factory('issue_grid', ['$resource', function ($resource) {
overlord_service.factory('Voucher', ['$resource', function ($resource) {
return $resource('/Voucher/:id',
{id:'@VoucherID'}, {
post: {method:'POST', params:{post:true}}
post:{method:'POST', params:{post:true}}
});
}]);
// TODO: Replace hardcoded url with route_url
overlord_service.factory('Account', ['$resource', function ($resource) {
return $resource('/Account/:id',
{id:'@LedgerID'}, {
query:{method:'GET', params:{list:true}, isArray:true}
});
}]);
// TODO: Replace hardcoded url with route_url
overlord_service.factory('Ledger', ['$resource', function ($resource) {
return $resource('/json/Ledger/:id');
}]);
// TODO: Replace hardcoded url with route_url
overlord_service.factory('Permission', ['$resource', function ($resource) {
return $resource('/Permissions');
}]);
// TODO: Replace hardcoded url with route_url
overlord_service.factory('CostCenter', ['$resource', function ($resource) {
return $resource('/CostCenters');
}]);
// TODO: Replace hardcoded url with route_url
overlord_service.factory('AccountType', ['$resource', function ($resource) {
return $resource('/AccountTypes');
}]);

@ -1,5 +1,11 @@
var overlord = angular.module('overlord', ['overlord.directive', 'overlord.filter', 'overlord.service']);
var overlord = angular.module('overlord', ['overlord.directive', 'overlord.filter', 'overlord.service']).
config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) {
$routeProvider.
when('/Accounts', {templateUrl: '/partial/account-list.html', controller: AccountListCtrl}).
when('/Account/:id', {templateUrl: '/partial/account-detail.html', controller: AccountCtrl});
// .otherwise({redirectTo: '/phones'});
$locationProvider.html5Mode(true);
}]);
function AutoComplete(matchFieldName, lookupURL) {
$(matchFieldName).autocomplete({
source:function (request, response) {
@ -25,9 +31,9 @@ function AutoComplete(matchFieldName, lookupURL) {
function BaseCtrl($scope) {
function BaseCtrl($scope, Permission) {
$scope.auth = {
perms:perms,
perms:Permission.query(),
isUserInRole:function (role) {
return $scope.auth.perms.indexOf(role) !== -1;
}

@ -1,28 +1,10 @@
function Populate(vouchers) {
if (vouchers != null) {
var stateObj = { 'LedgerID':vouchers.id, 'Name':vouchers.name, 'StartDate':vouchers.start_date, 'FinishDate':vouchers.finish_date };
history.pushState(stateObj, 'Display', vouchers.url);
$('#txtLedger').val(vouchers.name);
$('#tbodyMain').html(vouchers.body);
$('#tfootMain').html(vouchers.footer);
}
function LedgerCtrl($scope, Ledger) {
$scope.info = new Ledger(info);
$scope.show = function () {
$scope.info = Ledger.get({id:$scope.info.Ledger.LedgerID, StartDate:$scope.info.StartDate, FinishDate:$scope.info.FinishDate}, function () {
}, function (data, status) {
$scope.toasts.push({Type:'Error', Message:data.data});
});
$('#txtLedger').focus();
};
}
function Show(ledgerString, ledgerID, startDate, finishDate) {
$.ajax({
type:"POST",
contentType:"application/json; charset=utf-8",
url:show_url,
data:JSON.stringify({ ledgerString:ledgerString, ledgerID:ledgerID, startDate:startDate, finishDate:finishDate }),
dataType:"json",
success:function (response) {
Populate(response);
},
error:function (jqXHR, textStatus) {
$("#ctl00_statusDiv").removeClass().addClass("error");
var msg = $.parseJSON(jqXHR.responseText).Message;
$("#ctl00_statusDiv").html(msg);
}
});
return false;
}

@ -39,7 +39,7 @@
}, true);
$scope.get = function (voucherid) {
$scope.voucher = Voucher.$get({VoucherID:voucherid}, function (u, putResponseHeaders) {
$scope.voucher = Voucher.get({VoucherID:voucherid}, function (u, putResponseHeaders) {
$scope.toasts.push({Type:'Success', Message:u.Code});
}, function (data, status) {
$scope.toasts.push({Type:'Error', Message:data.data});

@ -45,7 +45,7 @@
}, true);
$scope.get = function (voucherid) {
$scope.voucher = Voucher.$get({VoucherID:voucherid}, function (u, putResponseHeaders) {
$scope.voucher = Voucher.get({VoucherID:voucherid}, function (u, putResponseHeaders) {
$scope.toasts.push({Type:'Success', Message:u.Code});
}, function (data, status) {
$scope.toasts.push({Type:'Error', Message:data.data});

@ -55,7 +55,7 @@
}, true);
$scope.get = function (voucherid) {
$scope.voucher = Voucher.$get({VoucherID:voucherid}, function (u, putResponseHeaders) {
$scope.voucher = Voucher.get({VoucherID:voucherid}, function (u, putResponseHeaders) {
$scope.toasts.push({Type:'Success', Message:u.Code});
}, function (data, status) {
$scope.toasts.push({Type:'Error', Message:data.data});

@ -44,7 +44,7 @@
}, true);
$scope.get = function (voucherid) {
$scope.voucher = Voucher.$get({VoucherID:voucherid}, function (u, putResponseHeaders) {
$scope.voucher = Voucher.get({VoucherID:voucherid}, function (u, putResponseHeaders) {
$scope.toasts.push({Type:'Success', Message:u.Code});
}, function (data, status) {
$scope.toasts.push({Type:'Error', Message:data.data});

@ -0,0 +1,71 @@
# -*- coding: utf-8 -*-
<%inherit file="../base.mako"/>
<%block name="header">
<script type="text/javascript">
const perms = ${perms};
const account = ${account};
const account_types = ${account_types};
const cost_centers = ${cost_centers};
</script>
${h.ScriptLink(request, 'account.js')}
<script type="text/javascript">
$(document).ready(function () {
$('#txtLedger').focus();
});
</script>
</%block>
<%block name="content">
<form method="post" class="form-horizontal" ng-controller="AccountCtrl">
<legend>Ledger Edit / New</legend>
${h.CsrfToken(request.session)}
<div class="control-group">
<label for="txtCode" class="control-label">Code</label>
<div class="controls">
<input type="text" id="txtCode" class="non-search-box" disabled="disabled" ng-model="account.Code"/>
</div>
</div>
<div class="control-group">
<label for="txtName" class="control-label">Name</label>
<div class="controls">
<input type="text" id="txtName" ng-model="account.Name"/>
</div>
</div>
<div class="control-group">
<label for="ddlType" class="control-label">Type</label>
<div class="controls">
<select id="ddlType" class="select-box" ng-model="account.Type"
ng-options="l.AccountTypeID as l.Name for l in account_types"> </select>
</div>
</div>
<div class="control-group">
<div class="controls">
<label class="checkbox">
<input type="checkbox" ng-checked="account.IsActive"> Is Active
</label>
</div>
</div>
<div class="control-group">
<label for="ddlCostCenter" class="control-label">Cost Center</label>
<div class="controls">
<select id="ddlCostCenter" class="select-box" ng-model="account.CostCenter.CostCenterID"
ng-options="l.CostCenterID as l.Name for l in cost_centers"> </select>
</div>
</div>
<div class=" control-group" id="add">
<div class="controls">
<button ng-click="save()">Save</button>
</div>
</div>
</form>
</%block>

@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
<%inherit file="../base.mako"/>
<%block name="header">
<script type="text/javascript">
const perms = ${perms};
const info = ${info};
</script>
${h.ScriptLink(request, 'account.js')}
</%block>
<%block name="content">
<h2 class="ribbon-header">Ledgers</h2>
<table class="clean-table" ng-controller="AccountListCtrl">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Is Active?</th>
<th>Cost Center</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in info">
<td><a href="{{item.Url}}">{{item.Name}}</a></td>
<td>{{item.Type}}</td>
<td>{{item.IsActive}}</td>
<td>{{item.CostCenter}}</td>
</tr>
</tbody>
</table>
</%block>

@ -0,0 +1,106 @@
<!DOCTYPE html>
<html lang="en" ng-app="overlord">
<head>
<meta charset="utf-8">
<title>Hops n Grains</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Le styles -->
${h.CssLink(request, 'style.css')}
<style type="text/css">
body {
padding-top: 60px;
padding-bottom: 40px;
}
</style>
${h.CssLink(request, 'bootstrap-responsive.css')}
${h.CssLink(request, 'jquery-ui-1.8.16.custom.css')}
${h.JsLink(request, 'jquery-1.7.1.min.js')}
${h.JsLink(request, 'jquery-ui-1.8.17.custom.min.js')}
${h.JsLink(request, 'bootstrap.js')}
${h.JsLink(request, 'angular-1.0.1.js')}
${h.JsLink(request, 'angular-resource-1.0.1.js')}
<script type="text/javascript">
roles_url = '${request.route_url('is_user_in_roles')}';
role_url = '${request.route_url('is_user_in_role', id = '')}';
</script>
${h.ScriptLink(request, 'autocomplete.js')}
${h.ScriptLink(request, 'angular_directive.js')}
${h.ScriptLink(request, 'angular_filter.js')}
${h.ScriptLink(request, 'angular_service.js')}
${h.ScriptLink(request, 'session.js')}
${h.ScriptLink(request, 'account.js')}
<!-- Le fav and touch icons -->
<link rel="shortcut icon" href="${request.static_url('brewman:static/img/favicon.ico')}">
<link rel="apple-touch-icon-precomposed" sizes="144x144"
href="${request.static_url('brewman:static/img/apple-touch-icon-144-precomposed.png')}">
<link rel="apple-touch-icon-precomposed" sizes="114x114"
href="${request.static_url('brewman:static/img/apple-touch-icon-114-precomposed.png')}">
<link rel="apple-touch-icon-precomposed" sizes="72x72"
href="${request.static_url('brewman:static/img/apple-touch-icon-72-precomposed.png')}">
<link rel="apple-touch-icon-precomposed"
href="${request.static_url('brewman:static/img/apple-touch-icon-57-precomposed.png')}">
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="#">Hops n Grains</a>
<div class="nav-collapse">
<ul class="nav">
<li class="active"><a href="${request.route_url('home')}"><i class="icon-home"></i> Home</a></li>
</ul>
${h.voucher_menu(request) | n }
${h.report_menu(request) | n }
${h.entry_menu(request) | n }
${h.employee_menu(request) | n }
${h.account_menu(request) | n }
${h.product_menu(request) | n }
${h.login_menu(request) | n }
</div>
<!--/.nav-collapse -->
</div>
</div>
</div>
<div class="container" ng-controller="BaseCtrl">
<div class="row">
<div id="status" class="span4 offset4">
<div ng-repeat="toast in toasts" class="alert alert-{{toast.Type | lowercase}}" fadey>
<button class="close" ng-click="clearToast(toast)">×</button>
<strong>{{toast.Type}}!</strong> {{toast.Message}}
</div>
</div>
</div>
<ng-view></ng-view>
<hr>
<footer>
<p>&copy; Company 2012</p>
</footer>
</div>
<!-- /container -->
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
</body>
</html>

@ -1,134 +0,0 @@
<!DOCTYPE HTML>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8">
<!-- Page title -->
<title>${title}</title>
${h.CssLink(request, 'style.css')}
${h.CssLink(request, 'meta.css')}
${h.CssLink(request, 'jquery/jquery-ui-1.8.16.custom.css')}
${h.CssLink(request, '960/960.css')}
${h.CssLink(request, '960/reset.css')}
${h.CssLink(request, '960/text.css')}
${h.CssLink(request, 'normalize.css')}
${h.CssLink(request, 'form.css')}
${h.CssLink(request, 'header.css')}
${h.CssLink(request, 'table.css')}
${h.CssLink(request, 'button.css')}
${h.JsLink(request, 'jquery/jquery-1.7.1.min.js')}
${h.JsLink(request, 'jquery/jquery-ui-1.8.17.custom.min.js')}
${h.JsLink(request, 'autocomplete.js')}
${h.JsLink(request, 'session.js')}
<div tal:replace="structure page_header" />
</head>
<body tal:attributes="class pageclass">
<header id="page-header">
<!-- Site name + slogan -->
<hgroup>
<h1 id="site-name"><a href="${request.route_url('home')}" title="Hops n Grains: The Microbrewery">Hops n Grains The Microbrewery</a></h1>
<h2 id="site-slogan">Beer Food Sports</h2>
</hgroup>
<!-- /Site name + slogan -->
<!-- Site navigation wrapper -->
<div class="navigation-wrapper">
<!-- Header navigation -->
<nav id="header-navigation">
<ul>
<li tal:replace="structure h.login_menu(request)" />
<li><a href="">Voucher Entry</a>
<ul>
<li><a href="/AccountsTesting/Transaction/JournalForm.aspx">Journal</a></li>
<li><a href="/AccountsTesting/Transaction/PurchaseForm.aspx">Purchase</a></li>
<li><a href="/AccountsTesting/Transaction/PurchaseReturnForm.aspx">Purchase Return</a></li>
<li><a href="/AccountsTesting/Transaction/PaymentForm.aspx">Payment</a></li>
<li><a href="/AccountsTesting/Transaction/ReceiptForm.aspx">Receipt</a></li>
<li><a href="/AccountsTesting/Transaction/Issue.aspx">Issue</a></li>
<li><a href="/AccountsTesting/Transaction/VerificationNew.aspx">Verification</a></li>
<li><a href="/AccountsTesting/Transaction/InputSale.aspx">Input Sale</a></li>
</ul>
</li>
<li><a href="">Reports</a>
<ul>
<li><a href="/AccountsTesting/Reports/DisplayLedger.aspx">Display Ledger</a></li>
<li><a href="/AccountsTesting/Reports/ProductLedger.aspx">Product Ledger</a></li>
<li><a href="/AccountsTesting/Reports/RawMaterialCost.aspx">Raw Material Cost</a></li>
<li><a href="/AccountsTesting/Reports/Cash_Flow/Cash_Flow.aspx">Cash Flow</a></li>
<li><a href="/AccountsTesting/Reports/DayBook.aspx">Day Book</a></li>
<li><a href="">Purchases</a>
<ul>
<li><a href="/AccountsTesting/Reports/PurchaseEntry.aspx">Purchase Entry</a></li>
<li><a href="/AccountsTesting/Reports/Purchases/Purchases.aspx">Purchases</a></li>
<li><a href="/AccountsTesting/Reports/Purchases/PurchaseLedger.aspx">Purchase Ledger</a></li>
<li><a href="/AccountsTesting/Reports/ClosingStock.aspx">Closing Stock</a></li>
<li><a href="/AccountsTesting/Reports/Inventory/Main.aspx">Inventory Report</a></li>
<li><a href="/AccountsTesting/Reports/Issue/Issue_All.aspx">Issue</a></li>
</ul>
</li>
<li><a href="">Final Reports</a>
<ul>
<li><a href="/AccountsTesting/Reports/FinalReport/TrailBalance.aspx">Trail Balance</a></li>
<li><a href="/AccountsTesting/Reports/FinalReport/DifferentialTrailBalance.aspx">Differential Trail Balance</a></li>
<li><a href="/AccountsTesting/Reports/FinalReport/ProfitAndLoss.aspx">Profit and Loss</a></li>
<li><a href="/AccountsTesting/Reports/FinalReport/BalanceSheet.aspx">Balance Sheet</a></li>
<li><a href="/AccountsTesting/Reports/FinalReport/FullBalanceSheet.aspx">Full Balance Sheet</a></li>
</ul>
</li>
<li><a href="/AccountsTesting/Reports/ChangeLiablitiy.aspx">Change in Liablitiy</a></li>
<li><a href="/AccountsTesting/Reports/UncreditedSalaries.aspx">Uncredited Salary</a></li>
</ul>
</li>
<li><a href="">Entries</a>
<ul>
<li><a href="/AccountsTesting/Reports/UnPostedEntries.aspx">UnPosted Entries</a></li>
<li><a href="/AccountsTesting/Reports/Entries.aspx">Latest Entries</a></li>
</ul>
</li>
<li><a href="">Employees</a>
<ul>
<li><a href="/AccountsTesting/Employees/List.aspx">List</a></li>
<li><a href="/AccountsTesting/Employees/Add.aspx">Add</a></li>
<li><a href="/AccountsTesting/Employees/Attendance.aspx">Attendance</a></li>
<li><a href="/AccountsTesting/Employees/EmployeeAttendance.aspx">Employee Attendance</a></li>
<li><a href="/AccountsTesting/Employees/AttendanceRecord.aspx">Attendance Record</a></li>
<li><a href="/AccountsTesting/Employees/SalarySheet.aspx">Salary Sheet</a></li>
<li><a href="/AccountsTesting/Employees/CreditSalary.aspx">Credit Salary</a></li>
<li><a href="/AccountsTesting/Employees/CreditEsiPf.aspx">Credit Esi Pf</a></li>
<li><a href="/AccountsTesting/Employees/ImportFingerprint.aspx">Finger Print</a></li>
<li><a href="/AccountsTesting/Employees/PaymentSheet.aspx">Employee Payment Sheet</a></li>
<li><a href="/AccountsTesting/Employees/DisplaySalarySheet.aspx">Display Salary Sheet</a></li>
</ul>
</li>
<li><a href="">Ledgers</a>
<ul>
<li><a href="/AccountsTesting/Ledgers/List.aspx">Ledger List</a></li>
<li><a href="/AccountsTesting/Ledgers/Add.aspx">Add New Ledger</a></li>
<li><a href="${request.route_url('blog_post', id='1')}">Cost Center List</a></li>
<li><a href="${request.static_url('brewman:static/features/elements.html')}">Add Cost Center</a></li>
</ul>
</li>
<li><a href="">Products</a>
<ul>
<li><a href="/AccountsTesting/Products/List.aspx">Product List</a></li>
<li><a href="/AccountsTesting/Products/New.aspx">Add Product</a></li>
<li><a href="/AccountsTesting/Products/RecipeList.aspx">Recipe List</a></li>
</ul>
</li>
<li><a href="/AccountsTesting/Maintenance/Split.aspx">Split Data</a></li>
</ul>
</nav>
</div>
</header>
<div id="content" class="container_12 clearfix">
<p id="statusDiv" class="hidden"></p>
</div>
<div id="page-body" class="container_12 clearfix">
<tal:block metal:define-slot="content" />
</div>
</body>
</html>

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html lang="en" ng-app="overlord">
<head>
<head>
<meta charset="utf-8">
<title>${title}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@ -10,10 +10,10 @@
<!-- Le styles -->
${h.CssLink(request, 'style.css')}
<style type="text/css">
body {
padding-top: 60px;
padding-bottom: 40px;
}
body {
padding-top: 60px;
padding-bottom: 40px;
}
</style>
${h.CssLink(request, 'bootstrap-responsive.css')}
@ -25,75 +25,83 @@
${h.JsLink(request, 'angular-1.0.1.js')}
${h.JsLink(request, 'angular-resource-1.0.1.js')}
<script type="text/javascript">
roles_url = '${request.route_url('is_user_in_roles')}';
role_url = '${request.route_url('is_user_in_role', id = '')}';
<script type="text/javascript">
roles_url = '${request.route_url('is_user_in_roles')}';
role_url = '${request.route_url('is_user_in_role', id = '')}';
</script>
${h.ScriptLink(request, 'autocomplete.js')}
${h.ScriptLink(request, 'angular_directive.js')}
${h.ScriptLink(request, 'angular_filter.js')}
${h.ScriptLink(request, 'angular_service.js')}
${h.ScriptLink(request, 'session.js')}
${h.ScriptLink(request, 'angular_directive.js')}
${h.ScriptLink(request, 'angular_filter.js')}
${h.ScriptLink(request, 'angular_service.js')}
${h.ScriptLink(request, 'session.js')}
<%block name="header" />
<%block name="header" />
<!-- Le fav and touch icons -->
<!-- Le fav and touch icons -->
<link rel="shortcut icon" href="${request.static_url('brewman:static/img/favicon.ico')}">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="${request.static_url('brewman:static/img/apple-touch-icon-144-precomposed.png')}">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="${request.static_url('brewman:static/img/apple-touch-icon-114-precomposed.png')}">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="${request.static_url('brewman:static/img/apple-touch-icon-72-precomposed.png')}">
<link rel="apple-touch-icon-precomposed" href="${request.static_url('brewman:static/img/apple-touch-icon-57-precomposed.png')}">
</head>
<link rel="apple-touch-icon-precomposed" sizes="144x144"
href="${request.static_url('brewman:static/img/apple-touch-icon-144-precomposed.png')}">
<link rel="apple-touch-icon-precomposed" sizes="114x114"
href="${request.static_url('brewman:static/img/apple-touch-icon-114-precomposed.png')}">
<link rel="apple-touch-icon-precomposed" sizes="72x72"
href="${request.static_url('brewman:static/img/apple-touch-icon-72-precomposed.png')}">
<link rel="apple-touch-icon-precomposed"
href="${request.static_url('brewman:static/img/apple-touch-icon-57-precomposed.png')}">
</head>
<body>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="#">Hops n Grains</a>
<div class="nav-collapse">
<ul class="nav">
<li class="active"><a href="${request.route_url('home')}"><i class="icon-home icon-white"></i> Home</a></li>
</ul>
${h.voucher_menu(request) | n }
${h.report_menu(request) | n }
${h.entry_menu(request) | n }
${h.employee_menu(request) | n }
${h.ledger_menu(request) | n }
${h.product_menu(request) | n }
${h.login_menu(request) | n }
</div><!--/.nav-collapse -->
</div>
</div>
</div>
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="#">Hops n Grains</a>
<div class="container" ng-controller="BaseCtrl">
<div class="row">
<div class="nav-collapse">
<ul class="nav">
<li class="active"><a href="${request.route_url('home')}"><i class="icon-home"></i> Home</a></li>
</ul>
${h.voucher_menu(request) | n }
${h.report_menu(request) | n }
${h.entry_menu(request) | n }
${h.employee_menu(request) | n }
${h.account_menu(request) | n }
${h.product_menu(request) | n }
${h.login_menu(request) | n }
</div>
<!--/.nav-collapse -->
</div>
</div>
</div>
<div class="container" ng-controller="BaseCtrl">
<div class="row">
<div id="status" class="span4 offset4">
<div ng-repeat="toast in toasts" class="alert alert-{{toast.Type | lowercase}}" fadey>
<button class="close" ng-click="clearToast(toast)">×</button> <strong>{{toast.Type}}!</strong> {{toast.Message}}
<button class="close" ng-click="clearToast(toast)">×</button>
<strong>{{toast.Type}}!</strong> {{toast.Message}}
</div>
</div>
</div>
</div>
<%block name="content"/>
${self.body()}
<hr>
<%block name="content"/>
${self.body()}
<hr>
<footer>
<footer>
<p>&copy; Company 2012</p>
</footer>
</footer>
</div> <!-- /container -->
</div>
<!-- /container -->
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
</body>
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
</body>
</html>

@ -1,92 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bootstrap, from Twitter</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Le styles -->
${h.CssLink(request, 'style.css')}
<style type="text/css">
body {
padding-top: 60px;
padding-bottom: 40px;
}
</style>
${h.CssLink(request, 'bootstrap-responsive.css')}
${h.CssLink(request, 'jquery-ui-1.8.16.custom.css')}
${h.JsLink(request, 'jquery-1.7.1.min.js')}
${h.JsLink(request, 'jquery-ui-1.8.17.custom.min.js')}
${h.JsLink(request, 'bootstrap.js')}
<script type="text/javascript">
roles_url = '${request.route_url('is_user_in_roles')}';
role_url = '${request.route_url('is_user_in_role', id = '')}';
</script>
${h.ScriptLink(request, 'autocomplete.js')}
${h.ScriptLink(request, 'session.js')}
<tal:block metal:define-slot="content-header" />
<!-- Le fav and touch icons -->
<link rel="shortcut icon" href="${request.static_url('brewman:static/img/favicon.ico')}">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="${request.static_url('brewman:static/img/apple-touch-icon-144-precomposed.png')}">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="${request.static_url('brewman:static/img/apple-touch-icon-114-precomposed.png')}">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="${request.static_url('brewman:static/img/apple-touch-icon-72-precomposed.png')}">
<link rel="apple-touch-icon-precomposed" href="${request.static_url('brewman:static/img/apple-touch-icon-57-precomposed.png')}">
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="#">Hops n Grains</a>
<div class="nav-collapse">
<ul class="nav">
<li class="active"><a href="${request.route_url('home')}"><i class="icon-home icon-white"></i> Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
<li tal:replace="structure h.voucher_menu(request)" />
<li tal:replace="structure h.report_menu(request)" />
<li tal:replace="structure h.entry_menu(request)" />
<li tal:replace="structure h.employee_menu(request)" />
<li tal:replace="structure h.ledger_menu(request)" />
<li tal:replace="structure h.product_menu(request)" />
<li tal:replace="structure h.login_menu(request)" />
</div><!--/.nav-collapse -->
</div>
</div>
</div>
<div class="container">
<div class="row">
<div id="status" class="span4 offset4"></div>
</div>
<tal:block metal:define-slot="content" />
<hr>
<footer>
<p>&copy; Company 2012</p>
</footer>
</div> <!-- /container -->
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
</body>
</html>

@ -1,35 +0,0 @@
<!DOCTYPE HTML>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8">
<!-- Page title -->
<title>${title} - </title>
${h.JsLink(request, 'jquery-ui-1.8.17.custom.min.js')}
${h.JsLink(request, 'jquery.dataTables-1.9.0.min.js')}
<div tal:replace="structure page_header" />
</head>
<body tal:attributes="class pageclass">
<header id="page-header">
<!-- Site name + slogan -->
<hgroup>
<h1 id="site-name"><a href="${request.route_url('home')}" title="Hops n Grains: The Microbrewery">Hops n Grains The Microbrewery</a></h1>
<h2 id="site-slogan">Beer Food Sports</h2>
</hgroup>
<!-- /Site name + slogan -->
</header>
<div id="page-body" class="container_12 clearfix">
<div id="toast" class="motivation-message grid_12 round-3 clearfix">
<p tal:repeat="item request.session.pop_flash()" class="font-3">${item}</p>
</div>
</div>
</body>
</html>

@ -1,214 +0,0 @@
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
metal:use-macro="base">
<tal:block metal:fill-slot="content">
<!-- Page content -->
<section tal:attributes="class pagecontentclass">
<!-- Post item -->
<article class="postlist-item">
<!-- Post header -->
<header class="postlist-header">
<!-- Post title -->
<h2><a href="${request.route_url('blog_post', id=1)}" title="Praesent dictum diam...">Praesent dictum diam ac lacus semper vehicula.</a></h2>
<!-- /Post title -->
<!-- Post information -->
<p>Posted on <time datetime="2011-01-29T23:31:45+01:00">01.29.2011</time> in <span><a href="#">apps</a>, <a href="#">movies</a>, <a href="#">work</a></span> by <a href="#">Admin</a></p>
<!-- /Post information -->
</header>
<!-- /Post header -->
<!-- Post thumbnail -->
<section class="postlist-thumb round-3">
<a href="${request.route_url('blog_post', id=1)}" title="Post Thumbnail" class="aligncenter img-holder round-3"><img src="${request.static_url('brewman:static/assets/590x240.gif')}" width="590" height="240" alt="Praesent dictum diam" /></a> </section>
<!-- /Post thumbnail -->
<!-- Post intro -->
<section class="postlist-intro">
<p>In hac habitasse platea dictumst. Aliquam lobortis sodales pretium. Vivamus urna ligula, luctus sit amet cursus at, viverra sit amet odio. In mauris neque, semper non tincidunt quis, blandit ut lorem. Donec neque eros, rutrum in viverra nec, tristique id enim. Mauris vulputate ligula in dui elementum iaculis. Mauris bibendum dictum lectus vitae ultrices. Curabitur …</p>
</section>
<!-- /Post intro -->
<!-- Post links -->
<footer class="postlist-footer">
<div>
<a href="${request.route_url('blog_post', id=1)}#comments" title="Proceed to comments" class="btn">12 Comments</a> <a href="${request.route_url('blog_post', id=1)}" title="Read whole post" class="btn">Read more...</a> </div>
</footer>
<!-- /post links -->
</article>
<!-- /Post item -->
<!-- Post item -->
<article class="postlist-item">
<!-- Post header -->
<header class="postlist-header">
<!-- Post title -->
<h2><a href="${request.route_url('blog_post', id=1)}" title="Praesent dictum diam...">Praesent dictum diam ac lacus semper vehicula.</a></h2>
<!-- /Post title -->
<!-- Post information -->
<p>Posted on <time datetime="2011-01-29T23:31:45+01:00">01.29.2011</time> in <span><a href="#">apps</a>, <a href="#">movies</a>, <a href="#">work</a></span> by <a href="#">Admin</a></p>
<!-- /Post information -->
</header>
<!-- /Post header -->
<!-- Post thumbnail -->
<section class="postlist-thumb round-3">
<a href="${request.route_url('blog_post', id=1)}" title="Post Thumbnail" class="aligncenter img-holder round-3"><img src="${request.static_url('brewman:static/assets/590x240.gif')}" width="590" height="240" alt="Praesent dictum diam" /></a> </section>
<!-- /Post thumbnail -->
<!-- Post intro -->
<section class="postlist-intro">
<p>In hac habitasse platea dictumst. Aliquam lobortis sodales pretium. Vivamus urna ligula, luctus sit amet cursus at, viverra sit amet odio. In mauris neque, semper non tincidunt quis, blandit ut lorem. Donec neque eros, rutrum in viverra nec, tristique id enim. Mauris vulputate ligula in dui elementum iaculis. Mauris bibendum dictum lectus vitae ultrices. Curabitur …</p>
</section>
<!-- /Post intro -->
<!-- Post links -->
<footer class="postlist-footer">
<div>
<a href="${request.route_url('blog_post', id=1)}#comments" title="Proceed to comments" class="btn">12 Comments</a> <a href="${request.route_url('blog_post', id=1)}" title="Read whole post" class="btn">Read more...</a> </div>
</footer>
<!-- /post links -->
</article>
<!-- /Post item -->
<!-- Post item -->
<article class="postlist-item">
<!-- Post header -->
<header class="postlist-header">
<!-- Post title -->
<h2><a href="${request.route_url('blog_post', id=1)}" title="Praesent dictum diam...">Praesent dictum diam ac lacus semper vehicula.</a></h2>
<!-- /Post title -->
<!-- Post information -->
<p>Posted on <time datetime="2011-01-29T23:31:45+01:00">01.29.2011</time> in <span><a href="#">apps</a>, <a href="#">movies</a>, <a href="#">work</a></span> by <a href="#">Admin</a></p>
<!-- /Post information -->
</header>
<!-- /Post header -->
<!-- Post thumbnail -->
<section class="postlist-thumb round-3">
<a href="${request.route_url('blog_post', id=1)}" title="Post Thumbnail" class="aligncenter img-holder round-3"><img src="${request.static_url('brewman:static/assets/590x240.gif')}" width="590" height="240" alt="Praesent dictum diam" /></a> </section>
<!-- /Post thumbnail -->
<!-- Post intro -->
<section class="postlist-intro">
<p>In hac habitasse platea dictumst. Aliquam lobortis sodales pretium. Vivamus urna ligula, luctus sit amet cursus at, viverra sit amet odio. In mauris neque, semper non tincidunt quis, blandit ut lorem. Donec neque eros, rutrum in viverra nec, tristique id enim. Mauris vulputate ligula in dui elementum iaculis. Mauris bibendum dictum lectus vitae ultrices. Curabitur …</p>
</section>
<!-- /Post intro -->
<!-- Post links -->
<footer class="postlist-footer">
<div>
<a href="${request.route_url('blog_post', id=1)}#comments" title="Proceed to comments" class="btn">12 Comments</a> <a href="${request.route_url('blog_post', id=1)}" title="Read whole post" class="btn">Read more...</a> </div>
</footer>
<!-- /post links -->
</article>
<!-- /Post item -->
<!-- Post item -->
<article class="postlist-item">
<!-- Post header -->
<header class="postlist-header">
<!-- Post title -->
<h2><a href="${request.route_url('blog_post', id=1)}" title="Praesent dictum diam...">Praesent dictum diam ac lacus semper vehicula.</a></h2>
<!-- /Post title -->
<!-- Post information -->
<p>Posted on <time datetime="2011-01-29T23:31:45+01:00">01.29.2011</time> in <span><a href="#">apps</a>, <a href="#">movies</a>, <a href="#">work</a></span> by <a href="#">Admin</a></p>
<!-- /Post information -->
</header>
<!-- /Post header -->
<!-- Post thumbnail -->
<section class="postlist-thumb round-3">
<a href="${request.route_url('blog_post', id=1)}" title="Post Thumbnail" class="aligncenter img-holder round-3"><img src="${request.static_url('brewman:static/assets/590x240.gif')}" width="590" height="240" alt="Praesent dictum diam" /></a> </section>
<!-- /Post thumbnail -->
<!-- Post intro -->
<section class="postlist-intro">
<p>In hac habitasse platea dictumst. Aliquam lobortis sodales pretium. Vivamus urna ligula, luctus sit amet cursus at, viverra sit amet odio. In mauris neque, semper non tincidunt quis, blandit ut lorem. Donec neque eros, rutrum in viverra nec, tristique id enim. Mauris vulputate ligula in dui elementum iaculis. Mauris bibendum dictum lectus vitae ultrices. Curabitur …</p>
</section>
<!-- /Post intro -->
<!-- Post links -->
<footer class="postlist-footer">
<div>
<a href="${request.route_url('blog_post', id=1)}#comments" title="Proceed to comments" class="btn">12 Comments</a> <a href="${request.route_url('blog_post', id=1)}" title="Read whole post" class="btn">Read more...</a> </div>
</footer>
<!-- /post links -->
</article>
<!-- /Post item -->
<!-- Post item -->
<article class="postlist-item">
<!-- Post header -->
<header class="postlist-header">
<!-- Post title -->
<h2><a href="${request.route_url('blog_post', id=1)}" title="Praesent dictum diam...">Praesent dictum diam ac lacus semper vehicula.</a></h2>
<!-- /Post title -->
<!-- Post information -->
<p>Posted on <time datetime="2011-01-29T23:31:45+01:00">01.29.2011</time> in <span><a href="#">apps</a>, <a href="#">movies</a>, <a href="#">work</a></span> by <a href="#">Admin</a></p>
<!-- /Post information -->
</header>
<!-- /Post header -->
<!-- Post thumbnail -->
<section class="postlist-thumb round-3">
<a href="${request.route_url('blog_post', id=1)}" title="Post Thumbnail" class="aligncenter img-holder round-3"><img src="${request.static_url('brewman:static/assets/590x240.gif')}" width="590" height="240" alt="Praesent dictum diam" /></a> </section>
<!-- /Post thumbnail -->
<!-- Post intro -->
<section class="postlist-intro">
<p>In hac habitasse platea dictumst. Aliquam lobortis sodales pretium. Vivamus urna ligula, luctus sit amet cursus at, viverra sit amet odio. In mauris neque, semper non tincidunt quis, blandit ut lorem. Donec neque eros, rutrum in viverra nec, tristique id enim. Mauris vulputate ligula in dui elementum iaculis. Mauris bibendum dictum lectus vitae ultrices. Curabitur …</p>
</section>
<!-- /Post intro -->
<!-- Post links -->
<footer class="postlist-footer">
<div>
<a href="${request.route_url('blog_post', id=1)}#comments" title="Proceed to comments" class="btn">12 Comments</a> <a href="${request.route_url('blog_post', id=1)}" title="Read whole post" class="btn">Read more...</a> </div>
</footer>
<!-- /post links -->
</article>
<!-- /Post item -->
<div id="pager">
<ul>
<li class="pager-first"><a href="#" title="First page">&#171; First</a></li>
<li><a href="#" title="Second page">1</a></li>
<li><a href="#" title="Third page">2</a></li>
<li class="pager-current"><span title="Current page">3</span></li>
<li><a href="#" title="Fifth page">4</a></li>
<li class="pager-last"><a href="#" title="Last page">Last &#187;</a></li>
</ul>
</div>
</section>
<!-- /Content left -->
<!-- Page sidebar -->
<aside class="sidebar grid_4">
<div tal:replace="structure widget_categories" />
<div tal:replace="structure widget_comments" />
<div tal:replace="structure widget_gallery" />
<div tal:replace="structure widget_archive" />
<div tal:replace="structure widget_blog_roll" />
</aside>
<!-- Page sidebar -->
</tal:block>
</html>

@ -1,578 +0,0 @@
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
metal:use-macro="base">
<tal:block metal:fill-slot="content">
<!-- Page content -->
<div id="post-1" tal:attributes="class pagecontentclass">
<article class="post-content clearfix">
<!-- Post title + info -->
<header class="post-content-header">
<h2>${article.title}</h2>
<p>Posted on <time datetime="${article.datetime}">${article.datetime.strftime("%d.%m.%y")}</time> in <span tal:repeat="row article.tags"><a href="#">${row.tag.name}</a>, </span> by <a href="#">${article.author}</a></p>
</header>
<!-- /Post title + info -->
<!-- Post content -->
<section>
<p class="align-center">
<span class="img-holder round-3">
<img src="assets/590x290.gif" alt="Image example" />
<span class="caption">Centered image with caption without zoom</span>
</span>
</p>
<p>This post has all the text elements and also includes the slider shortcode example. This is also a sticky post set when you write this post in the WP admin area.</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p>
</section>
<section>
<h2>Section heading text</h2>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.</p>
<!-- Floated post illustration with "pretty photo" zoom -->
<a href="assets/590x290.gif" rel="prettyPhoto" class="img-holder align-right round-3" title="Post illustration">
<img src="assets/210x130.gif" width="210" height="130" alt="Image alt text" />
</a>
<!-- /Post illustration -->
<p>Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.</p>
<ul class="featured-list">
<li>Lorem ipsum dolor sit amet, consectetuer adipiscing,</li>
<li>Duis autem vel eum iriure dolor in hendrerit in vulputate,</li>
<li>Ut wisi enim ad minim veniam, quis nostrud exerci tation,</li>
<li>Praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</li>
</ul>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p>
</section>
<!-- /Post content -->
<!-- Post tags + social icons -->
<footer class="post-content-footer round-3">
<!-- Post tags -->
<nav class="post-content-tags">
<span>Tags:</span><a href="#">web</a>, <a href="#">design</a>, <a href="#">tag test</a>
</nav>
<!-- /Post tags -->
<!-- Post social icons -->
<div class="post-social-icons social-dark">
<a href="#" class="social-icon rss-icon" title="Subscribe via RSS">RSS Feed</a>
<a href="#" class="social-icon twitter-icon" title="Twitter profile">Twitter</a>
<a href="#" class="social-icon facebook-icon" title="Facebook profile">Facebook</a>
<a href="#" class="social-icon linkedin-icon" title="Linkedin profile">Linkedin</a>
<a href="#" class="social-icon myspace-icon" title="Myspace profile">Myspace</a>
<a href="#" class="social-icon youtube-icon" title="Youtube profile">Youtube</a>
<a href="#" class="social-icon flikr-icon" title="Flikr profile">Flikr</a>
</div>
<!-- /Post social icons -->
</footer>
<!-- /Post tags + social icons -->
</article>
<!-- /Post content -->
<!-- Post author -->
<section class="post-author content-box header-box box-1 round-3 clearfix">
<h2 class="box-head">About the author</h2>
<!-- Post author image -->
<a class="post-author-image round-3" href="#" title="Author's picture">
<img src="assets/70x70.gif" alt="Author's picture" />
</a>
<!-- /Post author image -->
<!-- Post author information -->
<div class="post-author-content">
<p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat.</p>
<p class="post-author-url font-2"><span>Author's website:</span><a href="#">Website-name.com</a></p>
</div>
<!-- /Post author information -->
</section>
<!-- /Post author -->
<!-- Relative articles -->
<nav class="post-relative clearfix">
<h2 class="ribbon-header">Relative posts</h2>
<ul>
<!-- Relative article item -->
<li>
<a class="img-holder round-3 post-relative-image" href="#" title="Post image">
<img src="assets/100x80.gif" alt="Post image" />
</a>
<a href="#" title="Lorem ipsum dolor sit amet">
<h3>Lorem ipsum dolor sit amet, consectetuer.</h3>
</a>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
</li>
<!-- /Relative article item -->
<!-- Relative article item -->
<li>
<a class="img-holder round-3 post-relative-image" href="#" title="Post image">
<img src="assets/100x80.gif" alt="Post image" />
</a>
<a href="#" title="Lorem ipsum dolor sit amet">
<h3>Lorem ipsum dolor sit amet, consectetuer.</h3>
</a>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
</li>
<!-- /Relative article item -->
</ul>
</nav>
<!-- /Relative articles -->
<!-- Comments -->
<aside class="comments">
<h2 class="ribbon-header">Comments</h2>
<!-- Comments list -->
<ul class="comments-list">
<!-- First level -->
<li id="comment-1">
<!-- Comment item -->
<article class="comment-item">
<!-- Comment content -->
<section class="comment-content round-3">
<!-- Comment header -->
<header class="comment-header">
<h3><a href="#">Author</a></h3>
<time datetime="2011-01-29T23:31:45+01:00" class="comment-created">January 29, 2011 at 23:45 pm</time>
</header>
<!-- /Comment header -->
<!-- Comment text -->
<p class="comment-text">Iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in.</p>
<!-- /Comment text -->
</section>
<!-- /Comment content -->
<!-- Comment picture + reply link -->
<aside class="comment-side">
<!-- Comment avatar -->
<a href="#" class="img-holder round-3 comment-avatar">
<img src="assets/70x70.gif" width="70" height="70"/>
</a>
<!-- /Comment avatar -->
<!-- Comment reply link -->
<a href="#" class="comment-reply btn">Reply</a>
<!-- /Comment reply link -->
</aside>
<!-- /Comment picture + reply link -->
</article>
<!-- /Comment item -->
<ul>
<!-- Second level -->
<li id="comment-2">
<!-- Comment item -->
<article class="comment-item">
<!-- Comment content -->
<section class="comment-content round-3">
<!-- Comment header -->
<header class="comment-header">
<h3><a href="#">Author</a></h3>
<time datetime="2011-01-29T23:31:45+01:00" class="comment-created">January 29, 2011 at 23:45 pm</time>
</header>
<!-- /Comment header -->
<!-- Comment text -->
<p class="comment-text">Iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in.</p>
<!-- /Comment text -->
</section>
<!-- /Comment content -->
<!-- Comment picture + reply link -->
<aside class="comment-side">
<!-- Comment avatar -->
<a href="#" class="img-holder round-3 comment-avatar">
<img src="assets/70x70.gif" width="70" height="70"/>
</a>
<!-- /Comment avatar -->
<!-- Comment reply link -->
<a href="#" class="comment-reply btn">Reply</a>
<!-- /Comment reply link -->
</aside>
<!-- /Comment picture + reply link -->
</article>
<!-- /Comment item -->
<ul>
<!-- Third level -->
<li id="comment-3">
<!-- Comment item -->
<article class="comment-item">
<!-- Comment content -->
<section class="comment-content round-3">
<!-- Comment header -->
<header class="comment-header">
<h3><a href="#">Author</a></h3>
<time datetime="2011-01-29T23:31:45+01:00" class="comment-created">January 29, 2011 at 23:45 pm</time>
</header>
<!-- /Comment header -->
<!-- Comment text -->
<p class="comment-text">Iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in.</p>
<!-- /Comment text -->
</section>
<!-- /Comment content -->
<!-- Comment picture + reply link -->
<aside class="comment-side">
<!-- Comment avatar -->
<a href="#" class="img-holder round-3 comment-avatar">
<img src="assets/70x70.gif" width="70" height="70"/>
</a>
<!-- /Comment avatar -->
<!-- Comment reply link -->
<a href="#" class="comment-reply btn">Reply</a>
<!-- /Comment reply link -->
</aside>
<!-- /Comment picture + reply link -->
</article>
<!-- /Comment item -->
<ul>
<!-- Fourth level -->
<li id="comment-4">
<!-- Comment item -->
<article class="comment-item">
<!-- Comment content -->
<section class="comment-content round-3">
<!-- Comment header -->
<header class="comment-header">
<h3><a href="#">Author</a></h3>
<time datetime="2011-01-29T23:31:45+01:00" class="comment-created">January 29, 2011 at 23:45 pm</time>
</header>
<!-- /Comment header -->
<!-- Comment text -->
<p class="comment-text">Iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in.</p>
<!-- /Comment text -->
</section>
<!-- /Comment content -->
<!-- Comment picture + reply link -->
<aside class="comment-side">
<!-- Comment avatar -->
<a href="#" class="img-holder round-3 comment-avatar">
<img src="assets/70x70.gif" width="70" height="70"/>
</a>
<!-- /Comment avatar -->
<!-- Comment reply link -->
<a href="#" class="comment-reply btn">Reply</a>
<!-- /Comment reply link -->
</aside>
<!-- /Comment picture + reply link -->
</article>
<!-- /Comment item -->
<ul>
<!-- Fifth level -->
<li id="comment-5">
<!-- Comment item -->
<article class="comment-item">
<!-- Comment content -->
<section class="comment-content round-3">
<!-- Comment header -->
<header class="comment-header">
<h3><a href="#">Author</a></h3>
<time datetime="2011-01-29T23:31:45+01:00" class="comment-created">January 29, 2011 at 23:45 pm</time>
</header>
<!-- /Comment header -->
<!-- Comment text -->
<p class="comment-text">Iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in.</p>
<!-- /Comment text -->
</section>
<!-- /Comment content -->
<!-- Comment picture + reply link -->
<aside class="comment-side">
<!-- Comment avatar -->
<a href="#" class="img-holder round-3 comment-avatar">
<img src="assets/70x70.gif" width="70" height="70"/>
</a>
<!-- /Comment avatar -->
<!-- Comment reply link -->
<a href="#" class="comment-reply btn">Reply</a>
<!-- /Comment reply link -->
</aside>
<!-- /Comment picture + reply link -->
</article>
<!-- /Comment item -->
</li>
<!-- /Fifth level -->
</ul>
</li>
<!-- /Fourth level -->
</ul>
</li>
<!-- /Third level -->
</ul>
</li>
<!-- /Second level -->
</ul>
</li>
<!-- /First level -->
<li id="comment-6">
<!-- Comment item -->
<article class="comment-item">
<!-- Comment content -->
<section class="comment-content round-3">
<!-- Comment header -->
<header class="comment-header">
<h3><a href="#">Author</a></h3>
<time datetime="2011-01-29T23:31:45+01:00" class="comment-created">January 29, 2011 at 23:45 pm</time>
</header>
<!-- /Comment header -->
<!-- Comment text -->
<p class="comment-text">Iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in.</p>
<!-- /Comment text -->
</section>
<!-- /Comment content -->
<!-- Comment picture + reply link -->
<aside class="comment-side">
<!-- Comment avatar -->
<a href="#" class="img-holder round-3 comment-avatar">
<img src="assets/70x70.gif" width="70" height="70"/>
</a>
<!-- /Comment avatar -->
<!-- Comment reply link -->
<a href="#" class="comment-reply btn">Reply</a>
<!-- /Comment reply link -->
</aside>
<!-- /Comment picture + reply link -->
</article>
<!-- /Comment item -->
</li>
<li id="comment-7">
<!-- Comment item -->
<article class="comment-item">
<!-- Comment content -->
<section class="comment-content round-3">
<!-- Comment header -->
<header class="comment-header">
<h3><a href="#">Author</a></h3>
<time datetime="2011-01-29T23:31:45+01:00" class="comment-created">January 29, 2011 at 23:45 pm</time>
</header>
<!-- /Comment header -->
<!-- Comment text -->
<p class="comment-text">Iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in.</p>
<!-- /Comment text -->
</section>
<!-- /Comment content -->
<!-- Comment picture + reply link -->
<aside class="comment-side">
<!-- Comment avatar -->
<a href="#" class="img-holder round-3 comment-avatar">
<img src="assets/70x70.gif" width="70" height="70"/>
</a>
<!-- /Comment avatar -->
<!-- Comment reply link -->
<a href="#" class="comment-reply btn">Reply</a>
<!-- /Comment reply link -->
</aside>
<!-- /Comment picture + reply link -->
</article>
<!-- /Comment item -->
</li>
</ul>
<!-- /Comments list -->
<!-- Comment form -->
<section class="comment-form clearfix">
<h2 class="ribbon-header">Add comment</h2>
<form id="comment-reply" action=".">
<div id="formMessage"></div>
<p>
<label for="author">Name</label>
<input type="text" name="author" id="author" required />
</p>
<p>
<label for="email">Email</label>
<input type="email" name="email" id="email" required />
</p>
<p>
<label for="url">Website</label>
<input type="url" name="url" id="url" />
</p>
<p>
<textarea name="text" id="text" cols="30" rows="10"></textarea>
</p>
<p>
<input type="submit" value="Send comment" />
</p>
</form>
</section>
<!-- /Comment form -->
</aside>
<!-- /Comments -->
</div>
<!-- /Page content -->
<!-- Page sidebar -->
<aside class="sidebar grid_4">
<!-- Widget categories -->
<nav class="widget-container widget-categories">
<h2 class="widget-heading">Categories</h2>
<div class="widget-content">
<ul>
<li>
<a href="#" title="Design category">Design</a>
<span class="widget-hint">136 Posts</span>
</li>
<li>
<a href="#" title="Coding category">Coding</a>
<span class="widget-hint">67 Posts</span>
</li>
<li>
<a href="#" title="Inspiration category">Inspiration</a>
<span class="widget-hint">61 Posts</span>
</li>
<li>
<a href="#" title="Project management category">Project management</a>
<span class="widget-hint">24 Posts</span>
</li>
<li>
<a href="#" title="FX's category">FX's</a>
<span class="widget-hint">16 Posts</span>
</li>
</ul>
</div>
</nav>
<!-- /Widget categories -->
<!-- Widget comments -->
<nav class="widget-container widget-comments">
<h2 class="widget-heading">Recent comments</h2>
<div class="widget-content">
<ul>
<li>
<a href="#" title="Comment for Post One">Phasellus lacinia, magna a...</a>
<span class="widget-hint"><a href="#">Admin</a></span>
</li>
<li>
<a href="#" title="Comment for Post One">Donec accumsan malesuada...</a>
<span class="widget-hint"><a href="#">Nickname</a></span>
</li>
<li>
<a href="#" title="Comment for Post One">Udipiscing elit mauris sifermeum...</a>
<span class="widget-hint"><a href="#">Long nickname</a></span>
</li>
<li>
<a href="#" title="Comment for Post One">Adipiscing elit maurise...</a>
<span class="widget-hint"><a href="#">Admin</a></span>
</li>
<li>
<a href="#" title="Comment for Post One">Phasellus lacinia, magna a ulla long...</a>
<span class="widget-hint"><a href="#">Admin</a></span>
</li>
</ul>
</div>
</nav>
<!-- /Widget comments -->
<!-- Widget gallery -->
<nav class="widget-container widget-gallery">
<h2 class="widget-heading">Gallery widget</h2>
<div class="widget-content">
<a href="assets/590x290.gif" class="img-holder round-3" rel="prettyPhoto[gallery-1]" title="Image gallery">
<img src="assets/70x70.gif" width="70" height="70" alt="Gallery item" />
</a>
<a href="assets/590x290.gif" class="img-holder round-3" rel="prettyPhoto[gallery-1]" title="Image gallery">
<img src="assets/70x70.gif" width="70" height="70" alt="Gallery item" />
</a>
<a href="assets/590x290.gif" class="img-holder round-3 gallery-last" rel="prettyPhoto[gallery-1]" title="Image gallery">
<img src="assets/70x70.gif" width="70" height="70" alt="Gallery item" />
</a>
<a href="assets/590x290.gif" class="img-holder round-3" rel="prettyPhoto[gallery-1]" title="Image gallery">
<img src="assets/70x70.gif" width="70" height="70" alt="Gallery item" />
</a>
<a href="assets/590x290.gif" class="img-holder round-3" rel="prettyPhoto[gallery-1]" title="Image gallery">
<img src="assets/70x70.gif" width="70" height="70" alt="Gallery item" />
</a>
<a href="assets/590x290.gif" class="img-holder round-3 gallery-last" rel="prettyPhoto[gallery-1]" title="Image gallery">
<img src="assets/70x70.gif" width="70" height="70" alt="Gallery item" />
</a>
<a href="assets/590x290.gif" class="img-holder round-3" rel="prettyPhoto[gallery-1]" title="Image gallery">
<img src="assets/70x70.gif" width="70" height="70" alt="Gallery item" />
</a>
<a href="assets/590x290.gif" class="img-holder round-3" rel="prettyPhoto[gallery-1]" title="Image gallery">
<img src="assets/70x70.gif" width="70" height="70" alt="Gallery item" />
</a>
<a href="assets/590x290.gif" class="img-holder round-3 gallery-last" rel="prettyPhoto[gallery-1]" title="Image gallery">
<img src="assets/70x70.gif" width="70" height="70" alt="Gallery item" />
</a>
</div>
</nav>
<!-- /Widget gallery -->
<!-- Widget archive -->
<nav class="widget-container widget-archive">
<h2 class="widget-heading">Archive</h2>
<div class="widget-content">
<ul>
<li>
<a href="#" title="January 2011 Archive">January 2011</a>
<span class="widget-hint">13 Items</span>
</li>
<li>
<a href="#" title="December 2010 Archive">December 2010</a>
<span class="widget-hint">6 Items</span>
</li>
<li>
<a href="#" title="November 2010 Archive">November 2010</a>
<span class="widget-hint">3 Items</span>
</li>
<li>
<a href="#" title="October 2010 Archive">October 2010</a>
<span class="widget-hint">5 Items</span>
</li>
</ul>
</div>
</nav>
<!-- /Widget archive -->
<!-- Widget blogroll -->
<nav class="widget-container widget-blogroll">
<h2 class="widget-heading">Blogroll</h2>
<div class="widget-content">
<ul>
<li><a href="#" title="Wordpress website">Wordpress.org</a></li>
<li><a href="#" title="Google's website">Google.com</a></li>
<li><a href="#" title="Long sitename">Some long site title</a></li>
<li><a href="#" title="Design booom themes">Dbooom themes</a></li>
</ul>
</div>
</nav>
<!-- /Widget blogroll -->
</aside>
<!-- Page sidebar -->
</tal:block>
</html>

@ -1,82 +0,0 @@
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
metal:use-macro="base">
<tal:block metal:fill-slot="content">
<!-- Page content -->
<article tal:attributes="class pagecontentclass">
<!-- Map -->
<section class="img-holder round-3">
<iframe width="590" height="250" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.co.in/maps?ie=UTF8&amp;q=hops+n+grains&amp;fb=1&amp;gl=in&amp;hq=hops+n+grains&amp;hnear=0x390fed0be66ec96b:0xa5ff67f9527319fe,Chandigarh&amp;cid=0,0,14521636041456668357&amp;iwloc=A&amp;ll=30.697886,76.849343&amp;spn=0.006295,0.006295&amp;output=embed"></iframe>
</section>
<!-- /Map -->
<!-- Intro text -->
<section>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent felis nulla, lacinia sodales placerat quis, aliquam et metus. Cras tincidunt gravida massa, ac tincidunt quam convallis a. Vivamus mattis ipsum urna, et volutpat enim. Nunc nisi mi, tincidunt ac tempus porta, pharetra eu dolor. Etiam sed odio non felis vulputate pellentesque.</p>
</section>
<!-- /Intro text -->
<hr />
<!-- Contact form -->
<section>
<h2 class="ribbon-header">Contact form</h2>
<form id="contact-form" method="post" action="sendmail.php">
<p>
<label for="cf_name">Name <span class="required">(Required *)</span></label>
<input type="text" name="cf_name" id="cf_name" class="required" required />
</p>
<p>
<label for="cf_email">Email <span class="required">(Required *)</span></label>
<input type="email" name="cf_email" id="cf_email" class="required email" required />
</p>
<p>
<label for="cf_subject">Subject</label>
<input type="text" name="cf_subject" id="cf_subject" />
</p>
<p>
<textarea name="cf_message" id="cf_message" class="required" rows="10" required></textarea>
</p>
<p>
<input type="submit" value="Send message" />
</p>
</form>
<div class="form-sent"></div>
</section>
<!-- /Contact form -->
</article>
<!-- /Page content -->
<!-- Page sidebar -->
<aside class="grid_4 sidebar">
<!-- Widget contact information -->
<section class="widget-container widget-contacts-info">
<h2 class="widget-heading">Contacts</h2>
<div class="widget-content">
<ul>
<li class="address">SCO 358, Sector 9, Panchkula, 134009</li>
<li class="phone"><span>Phone:</span>+91 172 402 6666</li>
<li class="fax"><span>Mobile:</span>+91 805 492 3853</li>
<li class="email"><span>Email:</span><a href="mailto:#">contact@hopsngrains.com</a></li>
</ul>
</div>
</section>
<!-- /Widget contact information -->
<!-- Widget recent tweets -->
<section class="widget-container widget-tweets">
<h2 class="widget-heading">Recent tweets</h2>
<div class="widget-content"></div>
</section>
<!-- /Widget recent tweets -->
</aside>
<!-- /Page sidebar -->
</tal:block>
</html>

@ -1,214 +0,0 @@
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
metal:use-macro="base">
<tal:block metal:fill-slot="content">
<!-- Page content -->
<div tal:attributes="class pagecontentclass">
<!-- Gallery list item -->
<section class="gallery-item grid_3">
<!-- Gallery item picture -->
<a class="gallery-image round-3" href="assets/590x290.gif" title="View fullsize" rel="prettyPhoto[gal]">
<span class="gallery-image-inner">
<img src="assets/210x130.gif" width="120" height="130" alt="Item one" />
</span>
</a>
<!-- /Gallery item picture -->
</section>
<!-- /Gallery list item -->
<!-- Gallery list item -->
<section class="gallery-item grid_3">
<!-- Gallery item picture -->
<a class="gallery-image round-3" href="assets/590x290.gif" title="View fullsize" rel="prettyPhoto[gal]">
<span class="gallery-image-inner">
<img src="assets/210x130.gif" width="120" height="130" alt="Item one" />
</span>
</a>
<!-- /Gallery item picture -->
</section>
<!-- /Gallery list item -->
<!-- Gallery list item -->
<section class="gallery-item grid_3">
<!-- Gallery item picture -->
<a class="gallery-image round-3" href="assets/590x290.gif" title="View fullsize" rel="prettyPhoto[gal]">
<span class="gallery-image-inner">
<img src="assets/210x130.gif" width="120" height="130" alt="Item one" />
</span>
</a>
<!-- /Gallery item picture -->
</section>
<!-- /Gallery list item -->
<!-- Gallery list item -->
<section class="gallery-item grid_3">
<!-- Gallery item picture -->
<a class="gallery-image round-3" href="assets/590x290.gif" title="View fullsize" rel="prettyPhoto[gal]">
<span class="gallery-image-inner">
<img src="assets/210x130.gif" width="120" height="130" alt="Item one" />
</span>
</a>
<!-- /Gallery item picture -->
</section>
<!-- /Gallery list item -->
<!-- Gallery list item -->
<section class="gallery-item grid_3">
<!-- Gallery item picture -->
<a class="gallery-image round-3" href="assets/590x290.gif" title="View fullsize" rel="prettyPhoto[gal]">
<span class="gallery-image-inner">
<img src="assets/210x130.gif" width="120" height="130" alt="Item one" />
</span>
</a>
<!-- /Gallery item picture -->
</section>
<!-- /Gallery list item -->
<!-- Gallery list item -->
<section class="gallery-item grid_3">
<!-- Gallery item picture -->
<a class="gallery-image round-3" href="assets/590x290.gif" title="View fullsize" rel="prettyPhoto[gal]">
<span class="gallery-image-inner">
<img src="assets/210x130.gif" width="120" height="130" alt="Item one" />
</span>
</a>
<!-- /Gallery item picture -->
</section>
<!-- /Gallery list item -->
<!-- Gallery list item -->
<section class="gallery-item grid_3">
<!-- Gallery item picture -->
<a class="gallery-image round-3" href="assets/590x290.gif" title="View fullsize" rel="prettyPhoto[gal]">
<span class="gallery-image-inner">
<img src="assets/210x130.gif" width="120" height="130" alt="Item one" />
</span>
</a>
<!-- /Gallery item picture -->
</section>
<!-- /Gallery list item -->
<!-- Gallery list item -->
<section class="gallery-item grid_3">
<!-- Gallery item picture -->
<a class="gallery-image round-3" href="assets/590x290.gif" title="View fullsize" rel="prettyPhoto[gal]">
<span class="gallery-image-inner">
<img src="assets/210x130.gif" width="120" height="130" alt="Item one" />
</span>
</a>
<!-- /Gallery item picture -->
</section>
<!-- /Gallery list item -->
<!-- Gallery list item -->
<section class="gallery-item grid_3">
<!-- Gallery item picture -->
<a class="gallery-image round-3" href="assets/590x290.gif" title="View fullsize" rel="prettyPhoto[gal]">
<span class="gallery-image-inner">
<img src="assets/210x130.gif" width="120" height="130" alt="Item one" />
</span>
</a>
<!-- /Gallery item picture -->
</section>
<!-- /Gallery list item -->
<!-- Gallery list item -->
<section class="gallery-item grid_3">
<!-- Gallery item picture -->
<a class="gallery-image round-3" href="assets/590x290.gif" title="View fullsize" rel="prettyPhoto[gal]">
<span class="gallery-image-inner">
<img src="assets/210x130.gif" width="120" height="130" alt="Item one" />
</span>
</a>
<!-- /Gallery item picture -->
</section>
<!-- /Gallery list item -->
<!-- Gallery list item -->
<section class="gallery-item grid_3">
<!-- Gallery item picture -->
<a class="gallery-image round-3" href="assets/590x290.gif" title="View fullsize" rel="prettyPhoto[gal]">
<span class="gallery-image-inner">
<img src="assets/210x130.gif" width="120" height="130" alt="Item one" />
</span>
</a>
<!-- /Gallery item picture -->
</section>
<!-- /Gallery list item -->
<!-- Gallery list item -->
<section class="gallery-item grid_3">
<!-- Gallery item picture -->
<a class="gallery-image round-3" href="assets/590x290.gif" title="View fullsize" rel="prettyPhoto[gal]">
<span class="gallery-image-inner">
<img src="assets/210x130.gif" width="120" height="130" alt="Item one" />
</span>
</a>
<!-- /Gallery item picture -->
</section>
<!-- /Gallery list item -->
<!-- Gallery list item -->
<section class="gallery-item grid_3">
<!-- Gallery item picture -->
<a class="gallery-image round-3" href="assets/590x290.gif" title="View fullsize" rel="prettyPhoto[gal]">
<span class="gallery-image-inner">
<img src="assets/210x130.gif" width="120" height="130" alt="Item one" />
</span>
</a>
<!-- /Gallery item picture -->
</section>
<!-- /Gallery list item -->
<!-- Gallery list item -->
<section class="gallery-item grid_3">
<!-- Gallery item picture -->
<a class="gallery-image round-3" href="assets/590x290.gif" title="View fullsize" rel="prettyPhoto[gal]">
<span class="gallery-image-inner">
<img src="assets/210x130.gif" width="120" height="130" alt="Item one" />
</span>
</a>
<!-- /Gallery item picture -->
</section>
<!-- /Gallery list item -->
<!-- Gallery list item -->
<section class="gallery-item grid_3">
<!-- Gallery item picture -->
<a class="gallery-image round-3" href="assets/590x290.gif" title="View fullsize" rel="prettyPhoto[gal]">
<span class="gallery-image-inner">
<img src="assets/210x130.gif" width="120" height="130" alt="Item one" />
</span>
</a>
<!-- /Gallery item picture -->
</section>
<!-- /Gallery list item -->
<!-- Gallery list item -->
<section class="gallery-item grid_3">
<!-- Gallery item picture -->
<a class="gallery-image round-3" href="assets/590x290.gif" title="View fullsize" rel="prettyPhoto[gal]">
<span class="gallery-image-inner">
<img src="assets/210x130.gif" width="120" height="130" alt="Item one" />
</span>
</a>
<!-- /Gallery item picture -->
</section>
<!-- /Gallery list item -->
<div id="pager">
<ul>
<li class="pager-first"><a href="#" title="First page">&#171; First</a></li>
<li><a href="#" title="Second page">1</a></li>
<li><a href="#" title="Third page">2</a></li>
<li class="pager-current"><span title="Current page">3</span></li>
<li><a href="#" title="Fifth page">4</a></li>
<li class="pager-last"><a href="#" title="Last page">Last &#187;</a></li>
</ul>
</div>
</div>
<!-- /Page content -->
</tal:block>
</html>

@ -1,36 +0,0 @@
# -*- coding: utf-8 -*-
<%inherit file="../base.mako"/>
<%block name="content">
<h2 class="ribbon-header">Ledger Edit / New</h2>
<form method="post" autocomplete="off">
${h.CsrfToken(request.session)}
<p>
${h.Label('Code: ' + str(h.Span('(Required *)', 'required')), 'code')}
${h.TextInput('code', value = item.code, css_class = 'required', required = 'required')}
</p>
<p>
${h.Label('Name: ' + str(h.Span('(Required *)', 'required')), 'name')}
${h.TextInput('name', value = item.name, css_class = 'required', required = 'required')}
</p>
<p>
${h.Label('Type: ' + str(h.Span('(Required *)', 'required')), 'type')}
${h.SelectInput('type', list = types, displayField = 'name', valueField = 'id', defaultValue = item.type)}
</p>
<p>
${h.Label('Is Active: ' + str(h.Span('(Required *)', 'required')), 'is_active')}
${h.CheckBoxInput('is_active', value = item.is_active, css_class = 'required')}
</p>
<p>
${h.Label('CostCenterID: ' + str(h.Span('(Required *)', 'required')), 'cost_center_id')}
${h.SelectInput('cost_center_id', list = cost_centers, displayField = 'name', valueField = 'id', defaultValue = item.costcenter_id)}
</p>
<p>
${h.SubmitButton('submit', 'Submit')}
</p>
</form>
</%block>

@ -1,33 +0,0 @@
# -*- coding: utf-8 -*-
<%inherit file="../base.mako"/>
<%block name="content">
<h2 class="ribbon-header">Cost Centers</h2>
<table id="gvGrid" class="clean-table">
<thead>
<tr>
<th class="LedgerID hide">LedgerID</th>
<th class="Code hide">Code</th>
<th class="Name">Name</th>
<th class="Type">Type</th>
<th class="IsActive">Is Active?</th>
<th class="CostCenterID hide">CostCenterID</th>
<th class="CostCenter">Cost Center</th>
</tr>
</thead>
<tbody id="tbodyMain">
% for item in list:
<tr>
<td class="LedgerID hide">${item.id}</td>
<td class="Code hide">${item.code}</td>
<td class="Name"><a href="${request.route_url('ledger_id', id=item.id)}">${item.name}</a></td>
<td class="Type">${item.type_object.name}</td>
<td class="IsActive">${item.is_active}</td>
<td class="CostCenterID hide">${item.costcenter_id}</td>
<td class="CostCenter">${item.costcenter.name}</td>
</tr>
% endfor
</tbody>
<tfoot id="tfootMain">
</tfoot>
</table>
</%block>

@ -1,76 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:tal="http://xml.zope.org/namespaces/tal">
<head>
<title>The Pyramid Web Application Development Framework</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
<meta name="keywords" content="python web application" />
<meta name="description" content="pyramid web application" />
<link rel="shortcut icon" href="${request.static_url('brewman:static/favicon.ico')}" />
<link rel="stylesheet" href="${request.static_url('brewman:static/pylons.css')}" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="http://static.pylonsproject.org/fonts/nobile/stylesheet.css" media="screen" />
<link rel="stylesheet" href="http://static.pylonsproject.org/fonts/neuton/stylesheet.css" media="screen" />
<!--[if lte IE 6]>
<link rel="stylesheet" href="${request.static_url('brewman:static/ie6.css')}" type="text/css" media="screen" charset="utf-8" />
<![endif]-->
</head>
<body>
<div id="wrap">
<div id="top">
<div class="top align-center">
<div><img src="${request.static_url('brewman:static/pyramid.png')}" width="750" height="169" alt="pyramid"/></div>
</div>
</div>
<div id="middle">
<div class="middle align-center">
<p class="app-welcome">
Welcome to <span class="app-name">${project}</span>, an application generated by<br/>
the Pyramid web application development framework.
</p>
</div>
</div>
<div id="bottom">
<div class="bottom">
<div id="left" class="align-right">
<h2>Search documentation</h2>
<form method="get" action="http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/search.html">
<input type="text" id="q" name="q" value="" />
<input type="submit" id="x" value="Go" />
</form>
</div>
<div id="right" class="align-left">
<h2>Pyramid links</h2>
<ul class="links">
<li>
<a href="http://pylonsproject.org">Pylons Website</a>
</li>
<li>
<a href="http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/#narrative-documentation">Narrative Documentation</a>
</li>
<li>
<a href="http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/#reference-material">API Documentation</a>
</li>
<li>
<a href="http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/#tutorials">Tutorials</a>
</li>
<li>
<a href="http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/#detailed-change-history">Change History</a>
</li>
<li>
<a href="http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/#sample-applications">Sample Applications</a>
</li>
<li>
<a href="http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/#support-and-development">Support and Development</a>
</li>
<li>
<a href="irc://irc.freenode.net#pyramid">IRC Channel</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div id="footer">
<div class="footer">&copy; Copyright 2008-2011, Agendaless Consulting.</div>
</div>
</body>
</html>

@ -1,8 +1,8 @@
<ul class="nav">
<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Ledgers <b class="caret"></b></a>
<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Accounts <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="${request.route_url('ledger_list')}">Ledger List</a></li>
<li><a href="${request.route_url('ledger')}">Add New Ledger</a></li>
<li><a href="${request.route_url('account_list')}">Accounts List</a></li>
<li><a href="${request.route_url('account')}">Add New Account</a></li>
<li><a href="${request.route_url('cost_center_list')}">Cost Center List</a></li>
<li><a href="${request.route_url('cost_center')}">Add Cost Center</a></li>
</ul>

@ -1,5 +1,5 @@
<ul class="nav pull-right">
<li tal:condition="user" class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-user icon-white"></i> ${user.name} <b class="caret"></b></a>
<li tal:condition="user" class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-user"></i> ${user.name} <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="${request.route_url('logout')}">Logout ${user.name}</a></li>
<li><a href="/AccountsTesting/Security/ChangePassword.aspx">Change Password</a></li>
@ -12,7 +12,7 @@
</li>
<li tal:condition="not user" class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-user icon-white"></i> User <b class="caret"></b></a>
<li tal:condition="not user" class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-user"></i> User <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="${request.route_url('login')}">Log in</a></li>
<li><a href="${request.route_url('user_groups')}">User Groups</a></li>

@ -1,79 +1,79 @@
# -*- coding: utf-8 -*-
<%inherit file="../base.mako"/>
<%block name="header">
<script type="text/javascript">
const perms = ${perms};
const info = ${info};
</script>
${h.ScriptLink(request, 'displayledger.js')}
<script type="text/javascript">
$(document).ready(function () {
AutoComplete('#txtLedger', '${request.route_url('services_ledger_list')}');
$('#txtStartDate').datepicker({ dateFormat:'dd-M-yy' });
${startDate}
$('#txtFinishDate').datepicker({ dateFormat:'dd-M-yy'});
${finishDate}
${ledger}
$('#txtLedger').focus();
show_url = '${request.route_url('display_ledger')}';
$("#btnSubmit").click(function () {
return Show($('#txtLedger').val(), '', $('#txtStartDate').val(), $('#txtFinishDate').val());
});
window.onpopstate = function (event) {
var state = event.state;
if (state != null) {
var ledgerID = event.state.LedgerID;
$('#txtStartDate').val(state.StartDate);
$('#txtFinishDate').val(state.FinishDate);
$('#txtLedger').val(state.Name);
Show('', ledgerID, $('#txtStartDate').val(), $('#txtFinishDate').val());
}
};
});
</script>
</%block>
<%block name="content">
<h2 class="ribbon-header">Display Ledger</h2>
<form method="post" autocomplete="off" class="login-form">
<form method="post" autocomplete="off" class="horizontal-form" ng-controller="LedgerCtrl">
${h.CsrfToken(request.session)}
<p>
${h.Label('Start Date:', 'txtStartDate')}
${h.TextInput('txtStartDate', css_class = 'non-search-box', autocomplete='off')}
</p>
<div class="control-group">
<label for="txtStartDate" class="control-label">Date</label>
<p>
${h.Label('Finish Date:', 'txtFinishDate')}
${h.TextInput('txtFinishDate', css_class = 'non-search-box', autocomplete='off')}
</p>
<div class="controls">
<datepicker id="txtStartDate" model="info" prop="StartDate" ng-model="info.StartDate"></datepicker>
<datepicker id="txtFinishDate" model="info" prop="FinishDate" ng-model="info.FinishDate"></datepicker>
</div>
</div>
<div class="control-group">
<label for="txtLedger" class="control-label">Ledger</label>
<p>
${h.Label('Ledger:', 'txtLedger')}
${h.TextInput('txtLedger', css_class = 'search-box', autocomplete='off', placeholder='Ledger')}
${h.SubmitButton('btnSubmit', 'Submit')}
</p>
<div class="controls">
<autocomplete id="txtLedger" url="${request.route_url('services_ledger_list')}"
selname="info.Ledger.Name"
selid="info.Ledger.LedgerID"></autocomplete>
<button ng-click="show()">Add</button>
</div>
</div>
<div class="control-group">
<label for="gvGrid" class="control-label"></label>
<p>
<table id="gvGrid" class="clean-table">
<thead>
<tr>
<th class="Date">Date</th>
<th class="Name">Particulars</th>
<th class="VoucherType">Type</th>
<th class="Narration">Narration</th>
<th class="Debit right">Debit</th>
<th class="Credit right">Credit</th>
<th class="Running right">Running</th>
</tr>
</thead>
<tbody id="tbodyMain">
${body}
</tbody>
<tfoot id="tfootMain">
${footer}
</tfoot>
</table>
</p>
<div class="controls">
<table id="gvGrid" class="clean-table">
<thead>
<tr>
<th>Date</th>
<th>Particulars</th>
<th>Type</th>
<th>Narration</th>
<th>Debit</th>
<th>Credit</th>
<th>Running</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in info.Body">
<th>{{item.Date}}</th>
<th><a href="{{item.Url}}">{{item.Name}}</a></th>
<th>{{item.Type}}</th>
<th>{{item.Narration}}</th>
<th class="right">{{item.Debit}}</th>
<th class="right">{{item.Credit}}</th>
<th class="right">{{item.Running}}</th>
</tr>
</tbody>
<tfoot>
<tr>
<th>{{info.Footer.Date}}</th>
<th>{{info.Footer.Name}}</th>
<th>{{info.Footer.Type}}</th>
<th>{{info.Footer.Narration}}</th>
<th class="right">{{info.Footer.Debit}}</th>
<th class="right">{{info.Footer.Credit}}</th>
<th class="right">{{info.Footer.Running}}</th>
</tr>
</tfoot>
</table>
</div>
</div>
</form>
</%block>

@ -1,157 +0,0 @@
<div class="clearfix" id="headNav">
<div class="lfloat">
<form method="get" id="navSearch" name="navSearch" action="http://www.facebook.com/search/results.php"
role="search" onsubmit="return Event.__inlineSubmit(this,event)">
<div class="uiTypeahead" id="uqkx95_1">
<div class="wrap"><input type="hidden" autocomplete="off" class="hiddenInput">
<div class="innerWrap"><span class="uiSearchInput textInput"><span><input type="text"
class="inputtext DOMControl_placeholder"
maxlength="100"
accesskey="/" id="q"
name="q"
onclick="var q = $(&quot;q&quot;);if (q.value == q.getAttribute(&quot;placeholder&quot;)) {q.focus(); return false;}"
placeholder="Search"
autocomplete="off"
tabindex=""
onfocus="$(&quot;search_first_focus&quot;).value = $(&quot;search_first_focus&quot;).value || +new Date();;var f = function() { ;JSCC.get('j4f30f0e9011075c873092723').init([&quot;searchRecorderBasic&quot;,&quot;showLoadingIndicator&quot;,&quot;initFilters&quot;]);;; };if (window.loaded) { f(); }else { Bootloader.loadComponents(&quot;SearchBootloader&quot;, f); }"
spellcheck="false"
value="Search"
title="Search"><button
type="submit"
onclick="var q = $(&quot;q&quot;);if (q.value == q.getAttribute(&quot;placeholder&quot;)) {q.focus(); return false;}"
title="Search"><span class="hidden_elem">Search</span></button></span></span></div>
</div>
</div>
<input type="hidden" name="init" id="init" value="quick"><input type="hidden" name="tas"
class="search_sid_input"
value="search_preload"><input type="hidden"
name="search_first_focus"
id="search_first_focus"
value="">
</form>
</div>
<div class="rfloat">
<ul id="pageNav" role="navigation">
<li class="topNavLink tinyman"><a href="http://www.facebook.com/tanshu?ref=tn_tnmn" title="Profile"
accesskey="2"><img
class="uiProfilePhoto headerTinymanPhoto uiProfilePhotoLarge img"
src="http://profile.ak.fbcdn.net/static-ak/rsrc.php/v1/yo/r/UlIqmHJn-SK.gif" alt=""><span
class="headerTinymanName">Amritanshu Agrawal</span></a></li>
<li class="topNavLink middleLink"><a href="http://www.facebook.com/find-friends/browser/?ref=tn">Find
Friends</a></li>
<li class="topNavLink middleLink" id="navHome"><a href="http://www.facebook.com/?ref=tn_tnmn" accesskey="1">Home</a>
</li>
<li id="navAccount" class="topNavLink"><a id="navAccountLink"
href="http://www.facebook.com/editaccount.php?ref=mb&amp;drop"
rel="toggle" role="button" aria-haspopup="1">
<div class="menuPulldown"></div>
</a>
<ul class="navigation" role="navigation">
<li>
<div class="highlanderIntro fsm fwn fcg">Use Facebook as:</div>
</li>
<li>
<form id="uqkx95_2" action="http://www.facebook.com/identity_switch.php" method="post"
onsubmit="return Event.__inlineSubmit(this,event)"><input type="hidden" autocomplete="off"
name="post_form_id"
value="f816ef8aed963604f539aac30d8792d9"><input
type="hidden" name="fb_dtsg" value="AQDOk4Ok" autocomplete="off"><input type="hidden"
name="user_id"
value="178159948924976"><input
type="hidden" name="url"
value="http://www.facebook.com/pages/HOPS-GRAINS/178159948924976"></form>
<a class="navSubmenu" id="navSubmenuPageLink_178159948924976"
onclick="$(&quot;uqkx95_2&quot;).submit()">
<div class="clearfix uiImageBlock"><img
class="mrs uiProfilePhoto uiImageBlockImage lfloat uiProfilePhotoSmall img"
src="http://profile.ak.fbcdn.net/static-ak/rsrc.php/v1/y5/r/j258ei8TIHu.png" alt="">
<div class="clearfix uiImageBlockContent "><span
class="count mls rfloat hidden_elem uiSideNavCount uiSideNavCountInline"><span
class="countValue fss">0</span></span>
<div class="navSubmenuName ellipsis">HOPS &amp; GRAINS</div>
</div>
</div>
</a></li>
<li>
<form id="uqkx95_3" action="http://www.facebook.com/identity_switch.php" method="post"
onsubmit="return Event.__inlineSubmit(this,event)"><input type="hidden" autocomplete="off"
name="post_form_id"
value="f816ef8aed963604f539aac30d8792d9"><input
type="hidden" name="fb_dtsg" value="AQDOk4Ok" autocomplete="off"><input type="hidden"
name="user_id"
value="140689022647339"><input
type="hidden" name="url" value="http://www.facebook.com/hopsngrains"></form>
<a class="navSubmenu" id="navSubmenuPageLink_140689022647339"
onclick="$(&quot;uqkx95_3&quot;).submit()">
<div class="clearfix uiImageBlock"><img
class="mrs uiProfilePhoto uiImageBlockImage lfloat uiProfilePhotoSmall img"
src="http://profile.ak.fbcdn.net/hprofile-ak-snc4/50516_140689022647339_6339074_q.jpg"
alt="">
<div class="clearfix uiImageBlockContent "><span
class="count mls rfloat uiSideNavCount uiSideNavCountInline"><span
class="countValue fss">2</span></span>
<div class="navSubmenuName ellipsis">Hops n Grains The Microbrewery</div>
</div>
</div>
</a></li>
<li>
<form id="uqkx95_4" action="http://www.facebook.com/identity_switch.php" method="post"
onsubmit="return Event.__inlineSubmit(this,event)"><input type="hidden" autocomplete="off"
name="post_form_id"
value="f816ef8aed963604f539aac30d8792d9"><input
type="hidden" name="fb_dtsg" value="AQDOk4Ok" autocomplete="off"><input type="hidden"
name="user_id"
value="342681342426248"><input
type="hidden" name="url"
value="http://www.facebook.com/pages/Micobwery-Hops-Grains/342681342426248"></form>
<a class="navSubmenu" id="navSubmenuPageLink_342681342426248"
onclick="$(&quot;uqkx95_4&quot;).submit()">
<div class="clearfix uiImageBlock"><img
class="mrs uiProfilePhoto uiImageBlockImage lfloat uiProfilePhotoSmall img"
src="http://profile.ak.fbcdn.net/static-ak/rsrc.php/v1/y5/r/j258ei8TIHu.png" alt="">
<div class="clearfix uiImageBlockContent "><span
class="count mls rfloat hidden_elem uiSideNavCount uiSideNavCountInline"><span
class="countValue fss">0</span></span>
<div class="navSubmenuName ellipsis">Micobwery Hops &amp; Grains</div>
</div>
</div>
</a></li>
<li class="menuDivider"></li>
<li><a class="navSubmenu" href="http://www.facebook.com/editaccount.php?ref=mb&amp;drop"
accesskey="6">Account Settings</a></li>
<li><a class="navSubmenu" href="http://www.facebook.com/settings/?tab=privacy&amp;ref=mb"
accesskey="7">Privacy Settings</a></li>
<li>
<form id="logout_form" method="post" action="/logout.php"
onsubmit="return Event.__inlineSubmit(this,event)"><input type="hidden" autocomplete="off"
name="post_form_id"
value="f816ef8aed963604f539aac30d8792d9"><input
type="hidden" name="fb_dtsg" value="AQDOk4Ok" autocomplete="off"><input type="hidden"
autocomplete="off"
name="ref"
value="mb"><input
type="hidden" autocomplete="off" name="h"
value="004e3fc8ab78a6894fa4f3452db9b342"><label
class="uiLinkButton logoutButton navSubmenu"><input type="submit"
value="Log Out"></label></form>
</li>
<li class="menuDivider"></li>
<li><a class="navSubmenu" href="http://www.facebook.com/help/?ref=drop" id="navHelpCenter">
<div class="clearfix">
<div class="lfloat">Help</div>
<img class="rfloat uiLoadingIndicatorAsync img"
src="http://static.ak.fbcdn.net/rsrc.php/v1/yb/r/GsNJNwuI-UM.gif" alt="" width="16"
height="11"></div>
</a></li>
</ul>
</li>
</ul>
</div>
</div>

@ -60,7 +60,7 @@
</tr>
</thead>
<tbody id="tbodyMain">
<tr class="Journal" ng-repeat="journal in voucher.Journals">
<tr ng-repeat="journal in voucher.Journals">
<td class="Debit">{{journal.Debit | debit}}</td>
<td class="Name">{{journal.Ledger.Name}}</td>
<td data-column="Amount" class="Amount Editable">{{journal.Amount}}</td>

@ -1,28 +0,0 @@
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
metal:use-macro="base">
<tal:block metal:fill-slot="content">
<!-- Page content -->
<article tal:attributes="class pagecontentclass">
<form action="${request.route_url('upload_picture')}" method="post" accept-charset="utf-8" enctype="multipart/form-data">
<p>
<label for="picture">Picture</label>
<input id="picture" name="picture" type="file" value="" />
</p>
<p>
<label for="comment">Comment <span class="required">(Required *)</span></label>
<input id="comment" name="comment" type="text" value="" />
</p>
<p>
<label for="size">Size <span class="required">(Required *)</span></label>
<input id="size" name="size" type="text" value="" />
</p>
<p>
<input type="submit" value="Upload" />
</p>
</form>
</article>
<!-- /Page content -->
</tal:block>
</html>

@ -0,0 +1,98 @@
import json
import uuid
from pyramid.response import Response
from pyramid.view import view_config
import transaction
from brewman.helpers import Literal
from brewman.models.master import CostCenter, Ledger, LedgerType
from brewman.models.validation_exception import ValidationError
from brewman.views import DecimalEncoder
@view_config(route_name='account_list', renderer='brewman:templates/angular_base.mako')
@view_config(request_method='GET', route_name='account_id', renderer='brewman:templates/angular_base.mako',
xhr=False)
@view_config(request_method='GET', route_name='account', renderer='brewman:templates/angular_base.mako',
xhr=False)
def html(request):
return {}
@view_config(request_method='POST', route_name='account_id', renderer='json', xhr=True)
@view_config(request_method='POST', route_name='account', renderer='json', xhr=True)
def save_update(request):
try:
id = request.matchdict.get('id', None)
if id is None:
Ledger(0, request.json_body['Name'], int(request.json_body['Type']), request.json_body['IsActive'],
uuid.UUID(request.json_body['CostCenter']['CostCenterID'])).create()
else:
new_type = int(request.json_body['Type'])
item = Ledger.by_id(uuid.UUID(id))
if not item.type == new_type:
item.code = Ledger.get_code(new_type)
item.type = new_type
item.name = request.json_body['Name']
item.is_active = request.json_body['IsActive']
item.costcenter_id = uuid.UUID(request.json_body['CostCenter']['CostCenterID'])
transaction.commit()
return account_info(item.id)
# url = request.route_url('account_list')
# return HTTPFound(location=url)
except ValidationError as ex:
transaction.abort()
response = Response("Failed validation: {0}".format(ex.message))
response.status_int = 500
return response
@view_config(request_method='DELETE', route_name='account_id', renderer='json', xhr=True)
def delete(request):
id = request.matchdict.get('id', None)
if id is None:
response = Response("Account is Null")
response.status_int = 500
return response
else:
response = Response("Account deletion not implemented")
response.status_int = 500
return response
@view_config(request_method='GET', route_name='account_id', renderer='json', xhr=True)
@view_config(request_method='GET', route_name='account', renderer='json', xhr=True)
def show(request):
list = request.GET.get('list', None)
if list:
list = Ledger.list()
ledgers = []
for item in list:
ledgers.append({'Name': item.name, 'Type': item.type_object.name, 'IsActive': item.is_active,
'CostCenter': item.costcenter.name, 'Url': request.route_url('account_id', id=item.id)})
return ledgers
else:
id = request.matchdict.get('id', None)
id = None if id is None else uuid.UUID(id)
return account_info(id)
@view_config(request_method='GET', route_name='account_type_list', renderer='json', xhr=True)
def account_type_list(request):
account_types = []
for item in LedgerType.list():
account_types.append({'AccountTypeID': item.id, 'Name': item.name})
return account_types
def account_info(id):
if id is None:
account = {'Code': '(Auto)', 'Type': LedgerType.by_name('Creditors').id, 'IsActive': True,
'CostCenter': CostCenter.overall()}
else:
account = Ledger.by_id(id)
account = {'LedgerID': account.id, 'Code': account.code, 'Name': account.name, 'Type': account.type,
'IsActive': account.is_active,
'CostCenter': {'CostCenterID': account.costcenter_id, 'Name': account.costcenter.name}}
return account

@ -43,7 +43,7 @@ def cost_center_submit(request):
# request.session.flash(ex.message)
return request
@view_config(route_name='cost_center_list', renderer='brewman:templates/ledgers/cost_center_list.mako')
@view_config(route_name='cost_center_list', renderer='brewman:templates/ledgers/cost_center_list.mako', xhr=False)
def cost_center_list(request):
dbsession = DBSession()
cost_centers = dbsession.query(CostCenter).all()
@ -52,4 +52,14 @@ def cost_center_list(request):
'pageclass': "page-blogpost page-sidebar-right",
'pagecontentclass': "page-content grid_12",
'page_header': '',
'list': cost_centers}
'list': cost_centers}
@view_config(request_method='GET', route_name='cost_center_list', renderer='json', xhr=True)
def get(request):
cost_centers = []
for item in CostCenter.list():
cost_centers.append({'CostCenterID': item.id, 'Name': item.name})
return cost_centers

@ -1,58 +0,0 @@
import uuid
from pyramid.httpexceptions import HTTPFound
from pyramid.view import view_config
import transaction
from brewman.models import DBSession
from brewman.models.master import CostCenter, Ledger, LedgerType
from brewman.models.validation_exception import ValidationError
@view_config(request_method='GET', route_name='ledger_id', renderer='brewman:templates/ledgers/ledger_edit.mako')
@view_config(request_method='GET', route_name='ledger', renderer='brewman:templates/ledgers/ledger_edit.mako')
def ledger_edit(request):
id = request.matchdict.get('id', None)
if id is None:
item = Ledger('(Auto)','')
else:
item = Ledger.by_id(uuid.UUID(id))
return {'title':'Hops n Grains - Blog',
'pageclass': "page-blogpost page-sidebar-right",
'pagecontentclass': "page-content grid_12",
'page_header': '',
'item': item,
'types': LedgerType.list(),
'cost_centers': CostCenter.list()}
@view_config(request_method='POST', route_name='ledger_id')
@view_config(request_method='POST', route_name='ledger')
def ledger_submit(request):
try:
id = request.matchdict.get('id', None)
if id is None:
Ledger(0,request.POST['name'], int(request.POST['type']), None, True if request.POST.has_key('is_active') else False, uuid.UUID(request.POST['cost_center_id'])).create()
else:
item = Ledger.by_id(uuid.UUID(id))
item.name = request.POST['name']
item.type = int(request.POST['type'])
item.is_active = True if request.POST.has_key('is_active') else False
item.costcenter_id = uuid.UUID(request.POST['cost_center_id'])
transaction.commit()
url = request.route_url('ledger_list')
return HTTPFound(location=url)
except ValidationError as ex:
# request.session.flash(ex)
transaction.abort()
# request.session.flash(ex.message)
return request
@view_config(route_name='ledger_list', renderer='brewman:templates/ledgers/ledger_list.mako')
def ledger_list_view(request):
dbsession = DBSession()
list = dbsession.query(Ledger).all()
return {'title':'Hops n Grains - Blog',
'pageclass': "page-blogpost page-sidebar-right",
'pagecontentclass': "page-content grid_12",
'page_header': '',
'list': list}

@ -18,8 +18,8 @@ def entry_menu(request):
def employee_menu(request):
return render('brewman:templates/nav_bar/employee.pt', {'request': request})
def ledger_menu(request):
return render('brewman:templates/nav_bar/ledger.pt', {'request': request})
def account_menu(request):
return render('brewman:templates/nav_bar/account.mako', {'request': request})
def product_menu(request):
return render('brewman:templates/nav_bar/product.pt', {'request': request})

@ -1,4 +1,6 @@
import datetime
import json
from pyramid.response import Response
from sqlalchemy.orm import joinedload_all
from sqlalchemy.sql.expression import func
import uuid
@ -10,67 +12,68 @@ from brewman.models import DBSession
from brewman.models.master import Ledger
from brewman.models.voucher import Voucher, Journal, VoucherType
from brewman.views import DecimalEncoder
from brewman.views.services.session import services_session_period_start, services_session_period_finish
from brewman.views.transactions import get_edit_url
@view_config(request_method='GET', route_name='display_ledger_id',
renderer='brewman:templates/reports/display_ledger.mako')
@view_config(request_method='GET', route_name='display_ledger', renderer='brewman:templates/reports/display_ledger.mako')
@view_config(request_method='GET', route_name='display_ledger',
renderer='brewman:templates/reports/display_ledger.mako')
def ledger_display_get(request):
ledger_id = request.matchdict.get('id', None)
if ledger_id is None:
body = ""
footer = ""
ledger = ""
startDate = Literal(
"StartDate('#txtStartDate', '{0}');".format(request.route_url('services_session_period_start')))
finishDate = Literal(
"FinishDate('#txtFinishDate', '{0}');".format(request.route_url('services_session_period_finish')))
id = request.matchdict.get('id', None)
perms = Literal(json.dumps([]))
if id is None:
info = {'StartDate': services_session_period_start(request),
'FinishDate': services_session_period_finish(request), 'Ledger': {}, 'Body': [],
'Footer': {}}
else:
ledger = Ledger.by_id(uuid.UUID(ledger_id))
startDate = request.GET.get('startDate', None)
finishDate = request.GET.get('finishDate', None)
report = build_report(request, ledger, startDate, finishDate)
body = Literal(report['body'])
footer = Literal(report['footer'])
startDate = Literal("$('#txtStartDate').val('{0}');".format(startDate))
finishDate = Literal("$('#txtFinishDate').val('{0}');".format(finishDate))
ledger = Literal("$('#txtLedger').val('{0}');".format(ledger.name))
start_date = request.GET.get('StartDate', services_session_period_start(request))
finish_date = request.GET.get('FinishDate', services_session_period_finish(request))
ledger = Ledger.by_id(uuid.UUID(id))
info = {'StartDate': start_date, 'FinishDate': finish_date,
'Ledger': {'LedgerID': ledger.id, 'Name': ledger.name},
'Body': [], 'Footer': {}}
return {'title': 'Display Ledger - Hops n Grains',
'pageclass': "page-blogpost page-sidebar-right",
'pagecontentclass': "page-content grid_12",
'page_header': '',
'body': body,
'footer': footer,
'startDate': startDate,
'finishDate': finishDate,
'ledger':ledger}
build_report(request, info)
info = Literal(json.dumps(info, cls=DecimalEncoder))
return {'title': 'Journal Entry',
'id': id,
'perms': perms,
'info': info}
@view_config(request_method='POST', route_name='display_ledger', renderer='json', xhr=True)
@view_config(request_method='GET', route_name='json_display_ledger', renderer='json', xhr=True)
def ledger_display_post(request):
ledgerID = request.json_body['ledgerID']
if ledgerID == '':
ledgerString = request.json_body['ledgerString']
ledger = Ledger.by_name(ledgerString)
id = request.matchdict.get('id', None)
if id is None:
response = Response("Ledger is Null")
response.status_int = 500
return response
else:
ledgerID = uuid.UUID(ledgerID)
ledger = Ledger.by_id(ledgerID)
startDate = request.json_body['startDate']
finishDate = request.json_body['finishDate']
return build_report(request, ledger, startDate, finishDate)
ledger = Ledger.by_id(uuid.UUID(id))
start_date = request.GET.get('StartDate', services_session_period_start(request))
finish_date = request.GET.get('FinishDate', services_session_period_finish(request))
info = {'StartDate': start_date, 'FinishDate': finish_date,
'Ledger': {'LedgerID': ledger.id, 'Name': ledger.name},
'Body': [], 'Footer': {}}
build_report(request, info)
return info
def build_report(request, ledger, startDate, finishDate):
body = ''
totalDebit, totalCredit, runningTotal, opening = opening_balance(ledger.id, startDate)
body += opening
def build_report(request, info):
ledger_id = info['Ledger']['LedgerID']
start_date = info['StartDate']
finish_date = info['FinishDate']
totalDebit, totalCredit, runningTotal, opening = opening_balance(ledger_id, start_date)
info['Body'].append(opening)
query = Voucher.query().options(joinedload_all(Voucher.journals, Journal.ledger, innerjoin=True))\
.filter(Voucher.journals.any(Journal.ledger_id == ledger.id))\
.filter(Voucher.date >= datetime.datetime.strptime(startDate, '%d-%b-%Y'))\
.filter(Voucher.date <= datetime.datetime.strptime(finishDate, '%d-%b-%Y'))\
.filter(Voucher.journals.any(Journal.ledger_id == ledger_id))\
.filter(Voucher.date >= datetime.datetime.strptime(start_date, '%d-%b-%Y'))\
.filter(Voucher.date <= datetime.datetime.strptime(finish_date, '%d-%b-%Y'))\
.filter(Voucher.type != VoucherType.by_name('Issue').id)\
.order_by(Voucher.date).order_by(Voucher.last_edit_date).all()
@ -80,7 +83,7 @@ def build_report(request, ledger, startDate, finishDate):
journalDebit = 0
name = ""
for journal in voucher.journals:
if journal.ledger_id == ledger.id:
if journal.ledger_id == ledger_id:
if voucher.posted:
runningTotal += (journal.amount * journal.debit)
journalDebit = journal.debit
@ -97,28 +100,17 @@ def build_report(request, ledger, startDate, finishDate):
name += "{0} / ".format(journal.ledger.name)
name = name[:-3]
running = "\u20B9 {0:,.2f}".format(abs(runningTotal)) + (' Dr' if runningTotal >= 0 else ' Cr')
name = '<a href="' + get_edit_url(request, voucher) + '">' + name + '</a>'
body += '<tr class="Voucher{0}" id="{1}"><td class="Date">{2}</td><td class="Name">{3}</td>'\
'<td class="VoucherType">{4}</td><td class="Narration">{5}</td><'\
'td class="Debit right">{6}</td><td class="Credit right">\u20B9 {7}</td>'\
'<td class="Running right">{8}</td></tr>'.format(
('' if voucher.posted else ' unposted'), str(voucher.id), voucher.date.strftime('%d-%b-%Y'), name,
VoucherType.by_id(voucher.type).name, voucher.narration, debit, credit, running)
info['Body'].append(
{'Date': voucher.date.strftime('%d-%b-%Y'), 'Name': name, 'Url': get_edit_url(request, voucher),
'Type': VoucherType.by_id(voucher.type).name, 'Narration': voucher.narration, 'Debit': debit,
'Credit': credit, 'Running': running, 'Posted': ('' if voucher.posted else 'unposted')})
totalDebit = "\u20B9 {0:,.2f}".format(totalDebit)
totalCredit = "\u20B9 {0:,.2f}".format(totalCredit)
runningTotal = "\u20B9 {0:,.2f}".format(abs(runningTotal)) + (' Dr' if runningTotal >= 0 else ' Cr')
voucher_type = VoucherType.by_name('Closing Balance')
footer = '<tr class="Voucher"><td class="Date">{0}</td><td class="Name">{1}</td>'\
'<td class="VoucherType">{2}</td><td class="Narration"></td>'\
'<td class="Debit right">{3}</td>'\
'<td class="Credit right">{4}</td>'\
'<td class="Running right">{5}</td></tr>'.format(
finishDate, voucher_type, voucher_type.name, totalDebit, totalCredit, runningTotal)
return {'body': body, 'footer': footer, 'start_date': startDate, 'finish_date': finishDate, 'id': str(ledger.id),
'name': ledger.name, 'url': request.route_url('display_ledger_id', id=str(ledger.id),
_query={'startDate': startDate, 'finishDate': finishDate})}
info['Footer'] = {'Date': finish_date, 'Name': 'Closing Balance', 'Type': 'Closing Balance',
'Narration': '', 'Debit': "\u20B9 {0:,.2f}".format(totalDebit),
'Credit': "\u20B9 {0:,.2f}".format(totalCredit),
'Running': "\u20B9 {0:,.2f}".format(abs(runningTotal)) + (
' Dr' if runningTotal >= 0 else ' Cr'),
'Posted': ''}
def opening_balance(ledgerID, startDate):
@ -148,9 +140,6 @@ def opening_balance(ledgerID, startDate):
runningTotal = opening
running = "\u20B9 {0:,.2f}".format(abs(runningTotal)) + (' Dr' if runningTotal >= 0 else ' Cr')
voucher_type = VoucherType.by_name('Opening Balance')
return debit, credit, runningTotal, '<tr class="Voucher"><td class="Date">{0}</td><td class="Name">{1}</td>'\
'<td class="VoucherType">{2}</td><td class="Narration"></td>'\
'<td class="Debit right">{3}</td>'\
'<td class="Credit right">{4}</td>'\
'<td class="Running right">{5}</td></tr>'.format(
startDate, voucher_type.name, voucher_type.name, debitShow, creditShow, running)
return debit, credit, runningTotal, {'Date': startDate, 'Name': voucher_type.name, 'Type': voucher_type.name,
'Narration': '', 'Debit': debitShow, 'Credit': creditShow,
'Running': running, 'Posted': ''}

@ -1,4 +1,5 @@
from datetime import date, timedelta
import json
from pyramid.view import view_config
from brewman.views.transactions import session_current_date
@ -44,6 +45,12 @@ def is_user_in_roles(request):
return roles
@view_config(route_name='user_permissions', renderer='json', xhr=True)
def user_permission(request):
print(json.dumps(request.session['perms']))
return request.session['perms']
def get_first_day(dt, d_years=0, d_months=0):
# d_years, d_months are "deltas" to apply to dt
y, m = dt.year + d_years, dt.month + d_months

@ -47,8 +47,6 @@ def voucher_post(request):
transaction.commit()
return voucher_info(Voucher.by_id(voucher.id))
except ValidationError as ex:
print('error')
print(ex.message)
transaction.abort()
response = Response("Failed validation: {0}".format(ex.message))
response.status_int = 500

@ -6,8 +6,8 @@ pyramid.debug_authorization = false
pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.default_locale_name = en
pyramid.includes =
pyramid_debugtoolbar
# pyramid.includes =
# pyramid_debugtoolbar
sqlalchemy.url = sqlite:///%(here)s/brewman/database/brewman.db
[server:main]