This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def gerar_itau(fatura, bank, encargos=0): | |
invoice = BoletoItau() | |
invoice.data_vencimento = fatura.dtvencto.date() | |
invoice.data_documento = fatura.dtemissao | |
invoice.nosso_numero = fatura.nosso_numero | |
invoice.numero_documento = fatura.fatura | |
invoice.valor_documento = fatura.valor | |
empresa = Empresa.objects.get(pk=settings.STUR_EMPRESA) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################### | |
# Install mongoDB Server on Ubuntu 16.04 LTS | |
############################################################################### | |
# Import the Public Key used by the Ubuntu Package Manager | |
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6 | |
# Create a file list for mongoDB to fetch the current repository | |
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.4.list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CreditCardExpirationField(forms.DateField): | |
default_error_messages = { | |
'min_value': _("This card has expired."), | |
'invalid': _("Please specify a valid expiration date.") | |
} | |
widget = forms.DateInput(format='%m/%Y') | |
input_formats = ('%m/%Y', '%m/%y') | |
default_validators = [ | |
MinValueValidator(now().date()), | |
] |