code from amapei

This commit is contained in:
cagette@ct8
2020-09-26 18:25:18 +00:00
parent 42fe367911
commit 72b4699871
1966 changed files with 220437 additions and 2 deletions
+22
View File
@@ -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";
}
}
+24
View File
@@ -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;
}
}
+22
View File
@@ -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";
}
}
+15
View File
@@ -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;
}
+21
View File
@@ -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";
}
}