Skip to content

Instantly share code, notes, and snippets.

@ejamesc
Created January 11, 2016 03:21
Show Gist options
  • Select an option

  • Save ejamesc/accdc7671a9ebdb638c9 to your computer and use it in GitHub Desktop.

Select an option

Save ejamesc/accdc7671a9ebdb638c9 to your computer and use it in GitHub Desktop.
var _super = module.Order;
module.Order = module.Order.extend({
init_from_JSON: function(json) {
_super.prototype.init_from_JSON.apply(this,arguments);
this.note = json.note;
},
export_as_JSON: function(){
var json = _super.prototype.export_as_JSON.apply(this,arguments);
json.note = this.note;
return json;
},
export_for_printing: function(){
var receipt = _super.prototype.export_as_printing.apply(this, arguments);
receipt.note = this.note;
return receipt;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment