code from amapei
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package payment;
|
||||
|
||||
/**
|
||||
* ...
|
||||
* @author fbarbut
|
||||
*/
|
||||
class Cash extends payment.Payment
|
||||
{
|
||||
|
||||
public static var TYPE = "cash";
|
||||
|
||||
public function new()
|
||||
{
|
||||
var t = sugoi.i18n.Locale.texts;
|
||||
this.type = TYPE;
|
||||
this.icon = '<i class="fa fa-credit-card" aria-hidden="true"></i>';
|
||||
this.name = t._("Cash");
|
||||
//this.desc = t._("Pay by cash at product distribution");
|
||||
this.link = "/transaction/cash";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package payment;
|
||||
|
||||
/**
|
||||
* ...
|
||||
* @author fbarbut
|
||||
*/
|
||||
class Check extends payment.Payment
|
||||
{
|
||||
public static var TYPE = "check";
|
||||
|
||||
public function new()
|
||||
{
|
||||
var t = sugoi.i18n.Locale.texts;
|
||||
this.type = TYPE;
|
||||
this.icon = '<i class="fa fa-credit-card" aria-hidden="true"></i>';
|
||||
this.name = t._("Check");
|
||||
this.link = "/transaction/check";
|
||||
}
|
||||
|
||||
public static function getCode(date:Date,place:db.Place,user:db.User){
|
||||
return date.toString().substr(0, 10) + "-" + place.id + "-" + user.id;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package payment;
|
||||
|
||||
/**
|
||||
* ...
|
||||
* @author fbarbut
|
||||
*/
|
||||
class MoneyPot extends payment.Payment
|
||||
{
|
||||
|
||||
public static var TYPE = "moneypot";
|
||||
|
||||
public function new()
|
||||
{
|
||||
var t = sugoi.i18n.Locale.texts;
|
||||
this.type = TYPE;
|
||||
this.icon = '<i class="glyphicon glyphicon-piggy-bank" aria-hidden="true"></i>';
|
||||
this.name = t._("Money pot");
|
||||
//this.desc = t._("Pay by cash at product distribution");
|
||||
this.link = "/transaction/moneypot";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package payment;
|
||||
|
||||
/**
|
||||
* ...
|
||||
* @author fbarbut
|
||||
*/
|
||||
class Payment
|
||||
{
|
||||
|
||||
public var type:String;
|
||||
public var icon:String;
|
||||
public var name:String; //translated name
|
||||
public var link:String;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package payment;
|
||||
|
||||
/**
|
||||
* ...
|
||||
* @author fbarbut
|
||||
*/
|
||||
class Transfer extends payment.Payment
|
||||
{
|
||||
|
||||
public static var TYPE = "transfer";
|
||||
|
||||
public function new()
|
||||
{
|
||||
var t = sugoi.i18n.Locale.texts;
|
||||
this.type = TYPE;
|
||||
this.icon = '<i class="fa fa-credit-card" aria-hidden="true"></i>';
|
||||
this.name = t._("Bank transfer");
|
||||
this.link = "/transaction/transfer";
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user